Skip to content

Docker Compose

Published: at 오전 12:00

Docker Compose


Docker Compose 란 다중 컨테이너 도커 애플리케이션을 정의하고 실행하기 위한 도구

version: "3"
services:
  redis-server:
    image: "redis"
  node-app:
    build: .
    ports:
      - "8080:8080"
version: "3"
services:
  react:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "3000:3000"
    volumes:
      - /usr/src/app/node_modules
      - ./:/usr/src/app
    stdin_open: true
  tests:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
      - /usr/src/app/node_modules
      - ./:/usr/src/app
    command: ["npm", "run", "test"]
docer-compose up
docer-compose up --build
docker-compose down
docker-compose -d up

Reference


https://www.inflearn.com/course/%EB%94%B0%EB%9D%BC%ED%95%98%EB%A9%B0-%EB%B0%B0%EC%9A%B0%EB%8A%94-%EB%8F%84%EC%BB%A4-ci/dashboard