buildx
buildx copied to clipboard
Allow `.env` file override (equivalent to docker-compose build's `--env-file` option) when using bake
As a follow up to #282
Depending on our build type (dev/ci/prod) we use different versions of a .env
file when running our builds with docker-compose build
. Would it be possible to add a --env-file
option to bake so it can provide the same functionality?
I am running into same issue, e.g. we modify default .env to .ghcr.env and want .ghcr.env to be picked up when building on github actions. So looking for below command to work. Will be great is this problem can be resolved in a some elegant way as requested by @salimepoint.
docker buildx bake -f docker-compose.yml -f .ghcr.env