연두색연필
LimePencil's Log
연두색연필
전체 방문자
오늘
어제

About Me

  • GitHub
  • Instagram
  • Gmail

인기 글

  • 분류 전체보기 (70)
    • Machine Learning (3)
      • MNIST (2)
    • PS & Algorithm (9)
    • Web (4)
      • HTML (1)
      • JavaScript (3)
    • Rust (2)
      • The Rust Programming Langua.. (2)
    • 논문 리뷰 (12)
      • Reinforcement Learning (10)
      • Computer Vision (2)
    • DevOps (17)
      • Docker (9)
      • Kubernetes (8)
    • Development (6)
      • SQL (6)
    • 잡다한 것들 (15)
      • 부스트캠프 AI Tech 4기 (13)

최근 댓글

Tag

  • Python
  • Kubernetes
  • K8s
  • 백준
  • 파이썬
  • docker
  • 쿠버네티스
  • 부스트캠프
  • 도커
  • ML
06-22 12:13
hELLO · Designed By 정상우.
연두색연필

LimePencil's Log

[Docker 배우기] Section 5. Docker Compose
DevOps/Docker

[Docker 배우기] Section 5. Docker Compose

2023. 12. 21. 22:46

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/

https://github.com/dockersamples/example-voting-app

'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
    'DevOps/Docker' 카테고리의 다른 글
    • [Docker 배우기] Section 7. Docker Engine, Storage, and Networking
    • [Docker 배우기] Section 6. Docker Registry
    • [Docker 배우기] Section 4. Docker Images
    • [Docker 배우기] Section 3. Docker Run
    연두색연필
    연두색연필
    ML, Programming, PS, 삶의 순간을 기록

    티스토리툴바