I have a docker file that using multiple build contexts copies a file from a named context: foo
. ie, something like:
COPY --from=foo . /bar
I can build it like this:
docker buildx build --build-context foo=/my/dir/
I'd like to be able to pass this named context from a docker-compose file:
- statically, ie hardcoded in docker-compose file.
- dynamically, ie passed to docker-compose file itself.