Docker로 Database 설치하기

2023. 10. 15. 05:23프로그램개발/Database

PostgreSql

$ docker pull postgres:latest
$ docker volume create pgdata
$ docker run -p 5432:5432 --name PostgreSql -e POSTGRES_PASSWORD=<암호> -e TZ=Asia/Seoul -d -v pgdata:/var/lib/postgresql/data -d postgres:latest

 

MariaDB

$ docker pull mariadb:latest
$ docker volume create mariadata
$ docker run -p 3306:3306 --name MariaDB -e MARIADB_ROOT_PASSWORD=<암호> -d -v mariadata:/var/lib/mariadb/data -d mariadb:latest

 

Oarcle 19C

$ docker pull doctorkirk/oracle-19c
$ docker volume create oradata
$ docker run --name oracle-19c -p 1521:1521 -e ORACLE_SID=ORCL -e ORACLE_PWD=<암호> -e ORACLE_CHARACTERSET=KO16MSWIN949 -v oradata:/opt/oracle/oradata -d doctorkirk/oracle-19c
반응형