通用数据库

免费工具们

实验环境搭建

 1# 如果 Docker Compose 版本太老,需修改yaml的版本
 2version: "3.6"
 3services:
 4   mysql8-test:
 5      image: mysql:8
 6      container_name: mysql8-test
 7      ports:
 8         - 33068:3306
 9      environment:
10         MYSQL_ROOT_PASSWORD: test-PW-123456
11
12   mysql57-test:
13      image: mysql:5.7
14      container_name: mysql57-test
15      ports:
16         - 33067:3306
17      environment:
18         MYSQL_ROOT_PASSWORD: test-PW-123456
19
20   oracle11-test:
21      # 初始化要2-3分钟,请耐心等待
22      # 初始化时,为SYS生成随机密码,需通过docker logs查看
23      # 实例名xe
24      image: datagrip/oracle:11.2.0.2-xe
25      container_name: oracle11-test
26      ports:
27         - 15211:1521
28      # 必须要1gb的共享内存才能成功启动
29      shm_size: 1gb
30
31   mssql19-test:
32      # 容器大概要占用1gb的内存
33      image: mcr.microsoft.com/mssql/server:2019-latest
34      container_name: mssql19-test
35      ports:
36         - 14339:1433
37      environment:
38         ACCEPT_EULA: Y
39         SA_PASSWORD: test-PW-123456
40         MSSQL_PID: Express
41
42   redis6-test:
43      image: redis:6
44      container_name: redis6-test
45      ports:
46         - 6376:6379
47
48   redis5-test:
49      image: redis:5
50      container_name: redis5-test
51      ports:
52         - 6375:6379
53
54   db2_11-test:
55      image: ibmcom/db2
56      container_name: db2_11-test
57      ports:
58         - 50000:50000
59      environment:
60         LICENSE: accept
61         DB2INST1_PASSWORD: test-PW-123456
62         DBNAME: testDB
63      privileged: true
64
65   pg-test:
66      image: postgres
67      container_name: postgres
68      ports:
69         - 5432:5432
70      environment:
71         POSTGRES_PASSWORD: test-PW-123456