Docker compose command

Docker compose is a tool to define and running multiple container Docker applications. In this tutorial, to learn more about docker compose command. Docker the essential for DevOps Roles.

“Build, Manage and Secure Your Apps Anywhere. Your Way.” Quote from docker!

Docker compose command

Start existing containers

[root@DevopsRoles ~]# docker-compose start

The screen output terminal:

[root@DevopsRoles docker-instance]# docker-compose start
Starting DB01 ... done
Starting WEB01 ... done

Stop existing containers

[root@DevopsRoles ~]# docker-compose stop

The screen output terminal:

[root@DevopsRoles docker-instance]# docker-compose stop
Stopping db01 ... done
Stopping web01 ... done

Pauses running containers

[root@DevopsRoles ~]# docker-compose pause

The screen output terminal:

[root@DevopsRoles docker-instance]# docker-compose pause
Pausing web01 ... done
Pausing db01 ... done

Unpause all processes containers

[root@DevopsRoles ~]# docker-compose unpause

The screen output terminal:

[root@DevopsRoles docker-instance]# docker-compose unpause
Unpausing db01 ... done
Unpausing web01 ... done

List all running containers.

[root@DevopsRoles ~]# docker-compose ps

The screen output terminal:

Docker compose command

Creating and starting a container

[root@DevopsRoles ~]# docker-compose up

Stop and remove containers, networks, images, and volumes

[root@DevopsRoles ~]# docker-compose down

The screen output terminal:

[root@DevopsRoles docker-instance]# docker-compose down
Stopping db01 ... done
Stopping web01 ... done
Removing db01 ... done
Removing web01 ... done
Removing network docker-instance_bridge

Conclusion

Thought the article, you can use “Docker compose command as above”. I hope will this your helpful.

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.