Exploring Docker Compose commands
We are over halfway through the chapter, and the only Docker Compose command we have run is docker-compose up
. If you have been following along and you run docker container ls -a
, you will see something similar to the following Terminal screen:
As you can see, we have a lot of containers with the status of Exited
. This is because when we used Ctrl + C to return to our Terminal, the Docker Compose containers were stopped.
Choose one of the Docker Compose applications and change to the folder that contains the docker-compose.yml
file, and we will work through some more Docker Compose commands. I will be using the Example Vote application.
up and ps
The first command is docker-compose up
, but this time, we will be adding a flag. In your chosen application folder, run the following:
$ docker-compose up -d
This will start your application back up, this time in...