diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fa7e6f6a..5052efda 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -39,3 +39,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} + # Keep the .git to allow including the commit in the --version output, see also: + # https://docs.docker.com/build/building/context/#keep-git-directory + build-args: | + BUILDKIT_CONTEXT_KEEP_GIT_DIR=1