Having a base docker-compose.yml
like the following:
version: '2'
services:
web:
build: .
...
How can I extend it to use an image instead?
docker-compose.prod.yml
version: '2'
services:
web:
image: username/repo:tag
Running it with docker docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
still promps:
Building web
Step 1/x : FROM ...
I tried with docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --no-build
:
ERROR: Service 'web' needs to be built, but --no-build was passed.
I'm expecting the "Pulling from name/repo message" instead. Which options do I have? Or do I need to create a complete duplicate file to handle this slight modification?