I\'m trying to learn how to use docker compose with a simple setup of an nginx container that reroutes requests to a ghost container. I\'m using the standard ghost image but hav
Just ran into this same issue, and the initial fix was to change the name of the service in docker-compose.yml
.
This worked, but the reason it worked is because Docker-compose caches the build & ties it to the service name. Every docker-compose up
after the first one just uses what it built before, so any changes you make to the Dockerfile
, or that section of the docker-compose.yml
are basically ignored.
When you (and I) changed the service name, it triggered a new build since that service name hasn't been tagged before.
The real solution is to do a: docker-compose build to rebuild the image (followed by a docker-compose up
). Their documentation doesn't really emphasize this issue.