forked from lerocha/chinook-database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
118 lines (113 loc) · 4.51 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.8'
name: chinook
services:
#----------------------------------------------------------------------------
# DB2 Container
# https://www.ibm.com/docs/en/db2/11.5?topic=system-macos
# Commands:
# su - chinook
# db2 connect to Chinook
# db2 -tf /docker-entrypoint-initdb.d/create_database.sql
#----------------------------------------------------------------------------
db2:
image: icr.io/db2_community/db2:latest
platform: linux/amd64
privileged: true
restart: always
environment:
LICENSE: accept
DB2INSTANCE: chinook
DB2INST1_PASSWORD: chinook
DBNAME: Chinook
BLU=: false
ENABLE_ORACLE_COMPATIBILITY: false
UPDATEAVAIL: NO
TO_CREATE_SAMPLEDB: false
REPODB: false
IS_OSXFS: true # identifies the operating system as macOS
PERSISTENT_HOME: true # true by default and should only specified as false when running Docker for Windows
HADR_ENABLED: false
ETCD_ENDPOINT:
ETCD_USERNAME:
ETCD_PASSWORD:
ports:
- "50000:50000"
volumes:
- ./ChinookDatabase/DataSources/Chinook_Db2.sql:/docker-entrypoint-initdb.d/create_database.sql
#----------------------------------------------------------------------------
# MySQL Container
# https://hub.docker.com/_/mysql
# Commands:
# mysql -u chinook -p Chinook
#----------------------------------------------------------------------------
mysql:
image: mysql:latest
environment:
MYSQL_USER: chinook
MYSQL_PASSWORD: chinook
MYSQL_ROOT_PASSWORD: chinook
MYSQL_DATABASE: Chinook
ports:
- "3306:3306"
volumes:
- ./ChinookDatabase/DataSources/Chinook_MySql.sql:/docker-entrypoint-initdb.d/Chinook_MySql.sql
- ./ChinookDatabase/DataSources/Chinook_MySql_AutoIncrementPKs.sql:/docker-entrypoint-initdb.d/Chinook_MySql_AutoIncrementPKs.sql
#----------------------------------------------------------------------------
# Oracle Container
# https://container-registry.oracle.com/ords/ocr/ba/database/express
# https://hub.docker.com/r/gvenzl/oracle-xe (Apple M chips)
# Commands:
# sqlplus -S / as sysdba @ /container-entrypoint-initdb.d/create_database.sql
#----------------------------------------------------------------------------
oracle:
image: gvenzl/oracle-xe:18-slim
# image: container-registry.oracle.com/database/express:latest
platform: linux/amd64
environment:
ORACLE_PASSWORD: Test123!
APP_USER: chinook
APP_USER_PASSWORD: chinook
ports:
- "1521:1521"
volumes:
- ./ChinookDatabase/DataSources/Chinook_Oracle.sql:/container-entrypoint-initdb.d/create_database.sql
# command:
# - sqlplus -S / as sysdba @ create_database.sql
#----------------------------------------------------------------------------
# PostgreSQL Container
# https://hub.docker.com/_/postgres
# Commands:
# psql -U chinook chinook
#----------------------------------------------------------------------------
postgres:
image: postgres:15.3-alpine
environment:
POSTGRES_USER: chinook
POSTGRES_PASSWORD: chinook
POSTGRES_DB: chinook_db
ports:
- "5432:5432"
volumes:
- ./ChinookDatabase/DataSources/Chinook_PostgreSql.sql:/docker-entrypoint-initdb.d/Chinook_PostgreSql.sql
- ./ChinookDatabase/DataSources/Chinook_PostgreSql_AutoIncrementPKs.sql:/docker-entrypoint-initdb.d/Chinook_PostgreSql_AutoIncrementPKs.sql
- ./ChinookDatabase/DataSources/Chinook_PostgreSql_SerialPKs.sql:/docker-entrypoint-initdb.d/Chinook_PostgreSql_SerialPKs.sql
#----------------------------------------------------------------------------
# SQL Server Container
# https://hub.docker.com/_/microsoft-mssql-server
# Commands:
# /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /docker-entrypoint-initdb.d/create_database.sql
# /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d Chinook
#----------------------------------------------------------------------------
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
platform: linux/amd64
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Test123!
MSSQL_PID: Developer
ports:
- "1433:1433"
volumes:
- ./ChinookDatabase/DataSources/Chinook_SqlServer.sql:/docker-entrypoint-initdb.d/create_database.sql
# command:
# - /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /docker-entrypoint-initdb.d/create_database.sql