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
The CMD in your Dockerfile
should start a process which needs to run in foreground. The command service nginx start
runs the process in deamon mode and thus your container exits cleanly because the service
command exits.
Use the following CMD ["nginx", "-g", "daemon off;"]
to start nginx (taken from official image) and it should work correctly.