Database Docker (mysql, mariadb, oracle, postgres...)
Database 관리# docker-compose.yml
services:
oracle:
image: gvenzl/oracle-xe
container_name: oracle
environment:
- ORACLE_PASSWORD=oracle
ports:
- "1521:1521"
volumes:
- ./volume.oracle-data:/opt/oracle/oradata
mysql:
image: mysql:8.0
container_name: mysql
environment:
- MYSQL_ROOT_PASSWORD=mysql
- MYSQL_DATABASE=mydb
ports:
- "3306:3306"
volumes:
- ./volume.mysql-data:/var/lib/mysql
mariadb:
image: mariadb:latest
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=mariadb
- MYSQL_DATABASE=mydb
ports:
- "3307:3306"
volumes:
- ./volume.mariadb-data:/var/lib/mysql
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: mssql
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=SqlServer2021
ports:
- "1433:1433"
volumes:
- ./volume.mssql-data:/var/opt/mssql
db2:
image: ibmcom/db2:11.5.5.1
container_name: db2
privileged: true
environment:
- DB2INST1_PASSWORD=db2inst1
- LICENSE=accept
- DB2INST1=inst1
- DBNAME=testdb
ports:
- "50000:50000"
volumes:
- ./volume.db2-data:/database
mongodb:
image: mongo:4.4
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=mongo
ports:
- "27017:27017"
volumes:
- ./volume.mongodb-data:/data/db
redis:
image: redis:alpine
container_name: redis
ports:
- "6379:6379"
volumes:
- ./volume.redis-data:/data
informix:
image: ibmcom/informix-developer-database
container_name: informix
environment:
- LICENSE=accept
- INFORMIX_PASSWORD=in4mix
ports:
- "9088:9088"
volumes:
- ./volume.informix-data:/opt/ibm/data
sqlite:
image: nouchka/sqlite3
container_name: sqlite
volumes:
- ./volume.sqlite-data:/db
command: tail -f /dev/null
couchdb:
image: couchdb:latest
container_name: couchdb
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=admin
ports:
- "5984:5984"
volumes:
- ./volume.couchdb-data:/opt/couchdb/data
cassandra:
image: cassandra:latest
container_name: cassandra
environment:
- CASSANDRA_START_RPC=true
ports:
- "9042:9042"
volumes:
- ./volume.cassandra-data:/var/lib/cassandra
postgres:
image: postgres:latest
container_name: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=mydb
ports:
- "5432:5432"
volumes:
- ./volume.postgres-data:/var/lib/postgresql/data
volumes:
volume.oracle-data:
volume.mysql-data:
volume.mariadb-data:
volume.mssql-data:
volume.db2-data:
volume.mongodb-data:
volume.redis-data:
volume.informix-data:
volume.sqlite-data:
volume.couchdb-data:
volume.cassandra-data:
volume.postgres-data:
mkdir volume.oracle-data volume.mysql-data volume.mariadb-data volume.mssql-data volume.db2-data volume.mongodb-data volume.redis-data volume.informix-data volume.sqlite-data volume.couchdb-data volume.cassandra-data volume.postgres-data
chmod 777 volume.oracle-data
docker-compuse up
'Database 관리' 카테고리의 다른 글
데이타베이스 콘솔 기본 명령어 모음 (0) | 2022.01.14 |
---|---|
디비별 SQL 비교 (0) | 2020.01.12 |