一、环境说明
windows 11 + vmware 17 + ubuntu 22
t@t:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
t@t:~$ docker info
Client:Version: 24.0.5Context: defaultDebug Mode: falseServer:Containers: 0Running: 0Paused: 0Stopped: 0...
二、搭建dm服务
2.1 下载docker镜像
从达梦社区上下载对应的docker镜像
https://eco.dameng.com/download/
2.2 导入docker镜像
t@t:~$ docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar
644879075e24: Loading layer [==================================================>] 117.9MB/117.9MB
d7ff1dc646ba: Loading layer [==================================================>] 15.87kB/15.87kB
686245e78935: Loading layer [==================================================>] 14.85kB/14.85kB
d73dd9e65295: Loading layer [==================================================>] 5.632kB/5.632kB
2de391e51d73: Loading layer [==================================================>] 3.072kB/3.072kB
c709c635d729: Loading layer [==================================================>] 101.3MB/101.3MB
c853b6a23c2c: Loading layer [==================================================>] 2.56kB/2.56kB
3e10e7cfd329: Loading layer [==================================================>] 4.096kB/4.096kB
41e82b7aea0d: Loading layer [==================================================>] 153.6kB/153.6kB
3827eb1a7e43: Loading layer [==================================================>] 843.3kB/843.3kB
4f883f5c5226: Loading layer [==================================================>] 4.608kB/4.608kB
73412d6dfa0f: Loading layer [==================================================>] 389.2MB/389.2MB
52d551f8449b: Loading layer [==================================================>] 2.56kB/2.56kB
0b23aa5ba4bf: Loading layer [==================================================>] 4.608kB/4.608kB
b41227f2b3ed: Loading layer [==================================================>] 2.56kB/2.56kB
b5bd59020dd3: Loading layer [==================================================>] 4.096kB/4.096kB
33bfd86b40c4: Loading layer [==================================================>] 4.096kB/4.096kB
Loaded image: dm8_single:dm8_20230808_rev197096_x86_rh6_64
t@t:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dm8_single dm8_20230808_rev197096_x86_rh6_64 ab98e2f4a568 7 months ago 601MB
2.3 启动容器
t@t:~$ mkdir ~/dm8_testt@t:~$ docker run -d -p 30236:5236 --restart=always --name dm8_test --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_test -v ~/dm8_test:/opt/dmdbms/data dm8_single:dm8_20230808_rev197096_x86_rh6_64
8d369438e52a6afe1a303149c18c0886e2ab2afebc150c7e0c17a57b68faa235
t@t:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8d369438e52a dm8_single:dm8_20230808_rev197096_x86_rh6_64 "/bin/bash /opt/star…" About a minute ago Up About a minute 0.0.0.0:30236->5236/tcp, :::30236->5236/tcp dm8_test
三、使用dbeaver链接dm
3.1 下载dbeaver
https://dbeaver.io/
从官网下载
3.2 下载dm jdbc驱动
3.3 配置dbeaver
用户名/密码: SYSDBA/SYSDBA001
记得端口修改为30236,因为容器启动时是将此端口映射到容器内的5236
四、 参考
https://eco.dameng.com/document/dm/zh-cn/start/dm-install-docker.html
https://eco.dameng.com/community/article/56885f5ce2c66511506f7c7968da84fe