HostOnNet Blog

docker-compose

Looking for Linux Server Admin or WordPress Expert? We can help.

Dockerfile create one container. Docker Compose is used to create multi container application. Docker compose use Dockerfile to create container.

https://docs.docker.com/compose/

To install docker-compose on Ubuntu/Debian, run

apt install docker-compose

Docker compose save its configuration in file docker-compose.yml in YML format.

docker-compose quick start tutorial available at

https://docs.docker.com/compose/gettingstarted/

To build image, run

docker-compose build

To build image and start container, run

docker-compose up -d

To stop containers created from docker-compose, run

docker-compose kill

To delete all containers, run

docker-composer rm

Posted in Virtualization

Leave a Reply

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

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