Is there a way to work this?
When one employs two *.yml files, one to override the other; when do the overrides occur? It would appear that they do not occur in time for the build, but sometime after. Is this correct?
I am attempting to pass an argument to the Dockerfile from the compose file. I want to set it in one file and override it in another.
I have two files:
docker-compose-production.yml. In it, I have
services:
backend:
build:
arg:
stage: “–production”
docker-compose-develop.yml In it, I have
services:
backend:
build:
arg:
stage: “”
If I call
$> docker-compose --file docker-compose-production.yml up
arg gets set to --production and passed to my Dockerfile.
BUT
If I call
$> docker-compose --file docker-compose-production.yml --file docker-compose-develop.yml up
arg still gets set to --production. I need arg to be empty.
Thanks in advance