docker-compose 예제

2019.06.21 11:17docker

2019/06/21 - [docker] - Docker Compose 설명

docker-compose Sample

 

  • mysql db
  • musql admin page
  • cassandra
version: '3.1'

services:
  # DB Mysql
  db-mysql:
    image: mysql:5.7.21
    container_name: mysql
    command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    restart: always
    environment:
      MYSQL_DATABASE: hc_tarcking
      MYSQL_USER: hc_tarcking
      MYSQL_PASSWORD: hc_tarcking1!@
      MYSQL_ROOT_PASSWORD: root1!@
      TZ: Asia/Seoul
    volumes:
      - /var/lib/mysql:/var/lib/mysql
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3306:3306
  # DB Web Manager
  adminer:
    image: adminer
    container_name: adminer
    restart: always
    ports:
    - 8080:8080

  cassandra:
    image: cassandra:latest
    ports:
     -9042:9042
    #environment:

# Dockerfile 컨테이너 안의 내부 경로( virtual machine 안에 볼륨 링크)
#volumes:
#  db-mysql-data:


 

 

 

 

'docker' 카테고리의 다른 글

docker-compose 예제  (0) 2019.06.21
Docker-Compose 설명  (0) 2019.06.21
Dockerfile command / Attribute 명령어 설명  (0) 2019.06.21
docker 기본 명령어 및 설명  (0) 2019.06.21
docker- compose [cassandra / mysql]  (0) 2019.06.05
docker/mysql 기준 시간대 변경  (0) 2018.10.12
1 2 3 4 5 6