Docker Compose is a great tool for multi-services deployments, testing and development for Windows Containers and Linux.
Today, I will show you a few cool commands that will help you manage, clean and administrate Docker compose applications and projects.
Get Started
The most basic command to start a Docker Compose project is below with the -d switch which detaches you from the container otherwise you will be attached to the container.
docker-compose up -d
Stop
Next, I will use the command below to stop a running docker compose solution and will allow me to start it later on.
docker-compose stop
And if I have a few applications running I can stop them using the app name like the below example
docker-compose stop appname
Monitor
I can also use the command below to monitor my Docker Compose application and how it performs
docker-compose top
Logs
To view operational logs generated from the compose application I will use the logs switch as shown below
docker-compose logs
Pull
To pull images needed to the docker compose applications without stating the application I will use the command below
docker-compose pull
And once finished the image will be available
Conclusion
Using the commands above managing compose applications become easier and smarter.
About Docker Compose
Docker Compose is a tool for defining and running multi-container Docker applications using a YAML file to configure the application’s services.
Once the file Is created I can start all the services using a single command.
This post was first published on DeployContainers.com