반응형
version: '3.3'
services:
  redis:
    image: 'redis:6.0.5'
    environment:
      ALLOW_EMPTY_PASSWORD: "yes"
    ports:
    - 6379:6379
    volumes:
    - /mnt/d/docker/Redis/Log:/data
    - /mnt/d/docker/Redis/redis.conf:/usr/local/etc/redis/redis.conf
  mysql5.7:
    image: mysql:5.7.28
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: coral
    ports:
    - 3306:3306
    volumes:
    - /home/mysql5.7/Data:/var/lib/mysql
    - /home/mysql5.7/:/etc/mysql/
  postgreSQL:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: "test"      
    ports:
    - 5432:5432
    volumes:
    - /home/postgreSQL:/var/lib/postgresql/data

docker ps 로 이미명 찾자

 

# docker exec -it 4f85072fd34a bash

디비에 들어가자

 psql -U postgres

계정 생성

postgres=#  CREATE USER test PASSWORD 'test' SUPERUSER;

사용하자

 

+ Recent posts