Closed djmb closed 1 month ago
Docker does not respect the .dockerignore file when building from a tar. See https://github.com/docker/buildx/issues/2353.
Thanks to @jpdombrowski for pointing this out in https://github.com/basecamp/kamal/pull/700.
Instead by default we'll make a local clone into a tmp directory and build from there. Subsequent builds will reset the clone to match the checkout.
Compared to building directly in the repo, we'll have more reproducible builds and avoid accidentally including local changes.
Compared to using a git archive:
To build from the repo directly, set the build context to "." in the config.
If there are uncommitted changes, we'll warn about them either being included or ignored depending on whether we build from the clone.
Docker does not respect the .dockerignore file when building from a tar. See https://github.com/docker/buildx/issues/2353.
Thanks to @jpdombrowski for pointing this out in https://github.com/basecamp/kamal/pull/700.
Instead by default we'll make a local clone into a tmp directory and build from there. Subsequent builds will reset the clone to match the checkout.
Compared to building directly in the repo, we'll have more reproducible builds and avoid accidentally including local changes.
Compared to using a git archive:
To build from the repo directly, set the build context to "." in the config.
If there are uncommitted changes, we'll warn about them either being included or ignored depending on whether we build from the clone.