build-push-action icon indicating copy to clipboard operation
build-push-action copied to clipboard

Clarify .dockerignore usage in README

Open npwolf opened this issue 8 months ago • 2 comments

The previous instructions made me think mutation of the .dockerignore file was not supported with the git context, but the the basic .dockerignore was supported (not the case). Just trying to improve the doc so it is more clear.

npwolf avatar Mar 27 '25 17:03 npwolf

I have a Dockerfile that expects .git to be present. So I ran into this issue with the git vs path context. Once I found the relevant part in the README the explanation there was clear to me.

The problem I had is that I looked in the wrong place of the README (the examples section). So maybe we could add a link to this part of the README in the examples section?

mschoettle avatar Apr 30 '25 18:04 mschoettle

I have a Dockerfile that expects .git to be present. So I ran into this issue with the git vs path context. Once I found the relevant part in the README the explanation there was clear to me.

The problem I had is that I looked in the wrong place of the README (the examples section). So maybe we could add a link to this part of the README in the examples section?

You can keep the .git folder with Git context if you set the build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1: https://docs.docker.com/reference/dockerfile/#buildkit-built-in-build-args

crazy-max avatar May 21 '25 08:05 crazy-max