Skip to content

Commit

Permalink
Merge pull request #3 from lsst-dm/tickets/DM-44249
Browse files Browse the repository at this point in the history
DM-44249: Add AlmaLinux 9 Dockerfile.
  • Loading branch information
ktlim authored Jul 2, 2024
2 parents cdcceea + 05a80db commit 9532cfa
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on:
pull_request:
push:
tags:
- "*"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
rhel: [9]

steps:
- name: Define the tag
id: tag
shell: bash
run: |
if [ -n "$GITHUB_HEAD_REF" ]; then
echo tag=${GITHUB_HEAD_REF} | sed -E 's,/,-,g'
else
echo "tag=latest"
fi >> ${GITHUB_OUTPUT}
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3
name: Set up Docker Buildx

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ matrix.rhel }}-${{ steps.tag.outputs.tag }}
file: base-${{ matrix.rhel }}/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
18 changes: 18 additions & 0 deletions base-9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM almalinux:9
LABEL MAINTAINER="Kian-Tat Lim <[email protected]>"

ENV SUMMARY="Rubin Observatory base AlmaLinux 9 image for building software" \
DESCRIPTION="This is the base image required for conda, lsstsw, and \
lsstinstall workflows"

LABEL name="lsstdm/scipipe-base:9" \
version="9" \
summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Rubin Observatory AlmaLinux 9 container"

RUN INSTALL_PKGS="git patch diffutils" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
rpm -V ${INSTALL_PKGS} && \
yum -y clean all --enablerepo='*'

0 comments on commit 9532cfa

Please sign in to comment.