diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 000000000..f668cb6b1 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,31 @@ +name: Docker Image CI + +on: + push: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - 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.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Get commit ID + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64 + tags: ghcr.io/diamondlightsource/dlstbx:latest,ghcr.io/diamondlightsource/dlstbx:${{ steps.vars.outputs.sha_short }} diff --git a/Dockerfile b/Dockerfile index 70acbc470..c2df12a04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM harbor.diamond.ac.uk/dockerhub-cache/dials/dials:latest +FROM dials/dials:latest RUN yum install bzip2 libXxf86vm rrdtool git -y RUN pip install patchelf