Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 781 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 781 Bytes

Docker compose

Docker Compose builds your complete network consisting of multiple linked containers.

The Dockerfile exposes the application ports, and docker-compose.yml provides a mapping between the host machine (your EC2 instance) and the running Docker container so that, say, Docker port 3000 is mapped to host port 80. Therefore you get to see your application's output in your browser.

The docker-compose.yml also contains information for tagging your images to make them easier to push to an upstream repository (such as Docker Hub).

Start you containers

To start your network use up command.

docker-compose up &

Stop your containers

Docker Compose will also ensure all containers are shut down gracefully.

docker-compose stop