develog

[docker] docker-compose 본문

Dev/docker

[docker] docker-compose

냐옴 2020. 1. 17. 16:08

docker-compose.yml

version: '2'

services:

  mysqldb:

    image: mysql:5.7

    restart: always

    environment:

      MYSQL_ROOT_PASSWORD: 1234

      MYSQL_DATABASE: wordpress

  wordpress:

    image: wordpress

    ports:

      - "8080:80"

    restart: always

    environment:

      WORDPRESS_DB_HOST: mysqldb:3306

      WORDPRESS_DB_PASSWORD: 1234

 

실행

docker-compose up

'Dev > docker' 카테고리의 다른 글

[docker] Dockerfile 명령어  (0) 2022.02.07
[docker] ubuntu 실행  (0) 2022.02.05
docker timezone 설정  (0) 2020.08.06
[docker] CentOS, Ubuntu 에 docker engine 설치하기  (0) 2020.08.06
[docker] mysql + wordpress  (0) 2020.01.17
Comments