Skip to content

Commit

Permalink
Add dockerfile and build ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ttedeschi authored May 10, 2024
1 parent 8646996 commit c5e3a85
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-images

on:
push:
tags:
- "*"
jobs:
arc-sidecar:
runs-on: ubuntu-latest
#env:
# DOCKER_TARGET_PLATFORM: linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Repo Owner
id: get_repo_owner
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
- name: Build container base image
uses: docker/build-push-action@v5
with:
context: ./
outputs: "type=registry,push=true"
tags: |
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/htcondor-sidecar:${{ env.RELEASE_VERSION }}
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/htcondor-sidecar:latest
file: ./docker/Dockerfile
platforms: linux/amd64, linux/arm64
12 changes: 12 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM htcondor/mini:9.0.17-el7

RUN pip3 install pyyaml

COPY handles.py /utils/handles.py
COPY SidecarConfig.yaml /utils/SidecarConfig.yaml
RUN touch /utils/condor_config
RUN mkdir /utils/.knoc

WORKDIR /utils

CMD ["/bin/sh", "-c", "/start.sh & python3 handles.py"]

0 comments on commit c5e3a85

Please sign in to comment.