Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker build steps #378

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

StefanSchoof
Copy link

use modern docker multi platform builds (see https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/) and add step that push the image to the github container registry.

A push to the docker hub is also possible, This would require username and password in the secrets, see https://github.com/docker/login-action?tab=readme-ov-file#docker-hub.

Log of my build https://github.com/StefanSchoof/traefik-forward-auth/actions/runs/9222045539/job/25372382090
image in the github container registry https://github.com/StefanSchoof/traefik-forward-auth/pkgs/container/traefik-forward-auth

fixes #373

@oscrx
Copy link

oscrx commented May 27, 2024

Looks good, it can also be done neatly with the build and push action

Example from one of my pipelines:

      - name: Build and push
        uses: docker/build-push-action@v5
        with:
          context: ${{ matrix.folder }}
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          platforms: linux/amd64,linux/arm64
          cache-from: type=gha
          cache-to: type=gha
          # https://docs.docker.com/build/building/cache/backends/#cache-mode

@StefanSchoof
Copy link
Author

StefanSchoof commented May 27, 2024

You are right. I like to possibility to test everything locally with a docker buildx bake. But having file file less is also a good thing. So I thinks it depends which way someone prefers.

@ilteoood
Copy link

@thomseddon would be great to see this merged.
Has been a while since the last time the docker image has been refreshed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile not working anymore and no dockerhub update
3 participants