Docker for the Absolute Beginner - Hands On - DevOps | Udemy
docker-compose: allows to run and manage multiple containers with a single YAML file
- dictionary with the image name, and under each image name, put parameters as key-value pairs
- putting build under the image name builds the image first before running the container
- by using version 2 of docker-compose, the images are all linked
- need to specify version: 2 on the top
- can add depend_on: under the image name to show dependency between containers
- by using version 3, docker swarm can be used
docker run --link [host: internal]: links containers with each other so that it is accessible within a container
networks can be set as the argument by specifying the network under the image name
docker-compose up: runs all the containers specified in the YAML file
References:
https://docs.docker.com/compose/
https://docs.docker.com/engine/reference/commandline/compose/
'DevOps > Docker' 카테고리의 다른 글
[Docker 배우기] Section 7. Docker Engine, Storage, and Networking (0) | 2023.12.21 |
---|---|
[Docker 배우기] Section 6. Docker Registry (0) | 2023.12.21 |
[Docker 배우기] Section 4. Docker Images (0) | 2023.12.21 |
[Docker 배우기] Section 3. Docker Run (0) | 2023.12.21 |
[Docker 배우기] Section 2. Docker Commands (0) | 2023.12.20 |