Whenever I execute
docker-compose start
docker-compose ps
I see my containers with the state \"UP\". If I do
docker-compos
In docker Frequently asked questions this is explained very clearly:
What’s the difference between up, run, and start?
Typically, you want
docker-compose up. Useupto start or restart all the services defined in adocker-compose.yml. In the default “attached” mode, you see all the logs from all the containers. In “detached” mode (-d), Compose exits after starting the containers, but the containers continue to run in the background.The
docker-compose runcommand is for running “one-off” or “adhoc” tasks. It requires the service name you want to run and only starts containers for services that the running service depends on. Userunto run tests or perform an administrative task such as removing or adding data to a data volume container. Theruncommand acts likedocker run -tiin that it opens an interactive terminal to the container and returns an exit status matching the exit status of the process in the container.The
docker-compose startcommand is useful only to restart containers that were previously created, but were stopped. It never creates new containers.