Docker Compose - vvonha/NaverAPI GitHub Wiki

Docker Compose?

닀쀑 μ»¨ν…Œμ΄λ„ˆ 도컀 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μ •μ˜ν•˜κ³  λ™μž‘ν•˜κ²Œ ν•΄μ£ΌλŠ” νˆ΄μ΄λ‹€.
YAML 파일둜 μž‘μ„±λ˜μ–΄μ§€λ©° μž‘μ„±λœ yaml νŒŒμΌμ„ 읽어 λ“€μ—¬
λͺ¨λ“  μ„œλΉ„μŠ€μ— λŒ€ν•œ 생성 및 μ‹œμž‘μ„ ν•˜λ‚˜μ˜ λͺ…λ Ήμ–΄λ‘œ μ‹€ν–‰ν•  수 μžˆλ‹€.

Docker Desktop - Setting - Experimental Features - Use Docker Compose V2

Check Versions

docker_compose_version

Images

image

Yaml file

image

# docker-compose.yml
version: '3'
services:
  flask:
      build: ./flask
      container_name: flask
      image: "flask:test"
      ports:
       - "5000:5000"
      networks:
      - backend
  nginx:
      build: ./nginx
      container_name: nginx
      image: "nginx:test"
      ports:
       - "80:80"
      networks:
       - backend

networks:
  backend:
    driver: bridge

        # indent = 2

Command

docker compose up
image
docker compose down
image

References

도컀 μ»΄ν¬μ¦ˆκ°€ 무엇이고 μ–΄λ–»κ²Œ μ‹€ν–‰ν•˜λŠ” κ²ƒμΌκΉŒ