- 官网下载达梦docker镜像安装包
- 导入安装包
bash
docker load -i /Users/yeungsinsin/Downloads/dm8_20230808_rev197096_x86_rh6_64_single.tar
- 查看导入的镜像
bash
docker images
- docker run 启动容器
bash
docker run -d -p 30236:5236 --restart=always --name dm8 --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e EXTENT_SIZE=32 -e BLANK_PAD_MODE=1 -e LOG_SIZE=1024 -e UNICODE_FLAG=1 -e LENGTH_IN_CHAR=1 -e INSTANCE_NAME=dm8 -v /Users/yeungsinsin/Documents/htdz/dm8:/opt/dmdbms/data dm8_single:dm8_20230808_rev197096_x86_rh6_64
- 启动完成后,可通过日志检查启动情况,命令如下:
bash
docker logs -f dm8
- 启动/停止数据库
bash
docker stop dm8
docker start dm8
docker restart dm8