Docker Compose
Docker Compose
In this article we are going to see about docker compose and docker compose commands. Compose is a tool for defining and running multi-container Docker applications. with Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration
Compose works in all environments: production, staging, development, testing, as well as CI workflows.
Example: Full stack Application MEAN & MERN & Django and PostgreSQL etc.
Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
Run docker compose up and the Docker compose command starts and runs your entire app. You can alternatively run docker-compose up using the docker-compose binary.
Ex: docker-compose.yml
Docker Compose commands:
To check docker compose version:
#docker-compose -v
To run docker compose :
#docker-compose up
To remove docker compose:
#docker-compose down
To run docker compose with different name:
#docker-compose -f docker-compose1.yml up
Tags:
Docker
0 comments
Please leave your comments...... Thanks