heavenzhi1997/dm_single

By heavenzhi1997

Updated 7 months ago

This is the mirror repository of DM database. All the mirrors are from DM without any modification.

Image
Databases & Storage
Developer Tools

32

Introduction

This is the image repository of 达梦数据库. The version of the image starts from DM8.

Image source

All the images come from 达梦在线服务平台的 Docker 镜像 without any modification.

How to use this image

Docker

Simply create a DM container instance:

docker run -d \
--name dm8 \
--restart=always \
-p 5236:5236 \
--privileged=true \
-e SYSDBA_PWD=SYSDBA001 \
-v /etc/localtime:/etc/localtime:ro \
-v ~/docker_data/dm/data:/opt/dmdbms/data \
heavenzhi1997/dm_single:latest

Docker Compose

Use Docker Compose to simply create containers

Create the container directly with docker-compose.yml

# docker-compose.yml
# version: '3.9'
name: ${your_docker_group_name}
services:
  dm:
    image: heavenzhi1997/dm_single:latest
    container_name: dm8
    restart: always
    ports:
      - 5236:5236
    privileged: true
    environment:
        SYSDBA_PWD: SYSDBA001
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ~/docker_data/dm/data:/opt/dmdbms/data
Create a container by referring to a separate file

1.Create docker-compose.yml file to reference the container creation operation in dm-compose.yml file:

# docker-compose.yml
# version: '3.9'
name: ${your_docker_group_name}
services:
    dm:
        extends:
            file: dm-compose.yml
            service: dm

2.Create the dm-compose.yml file and write the actions for container creation:

# dm-compose.yml
version: '3.9'
services:
  dm:
    image: heavenzhi1997/dm_single:latest
    container_name: dm8
    restart: always
    ports:
      - 5236:5236
    privileged: true
    environment:
        SYSDBA_PWD: SYSDBA001
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ~/docker_data/dm/data:/opt/dmdbms/data

Connect to the DM container

Into the inside of the container:

# 1.进入的 dm8 容器内部
$ docker exec -it dm8 /bin/bash

# 2.切换到连接程序所在目录
$ cd /opt/dmdbms/bin

# 3.通过账户、密码、主机IP和端口去连接 dm8 容器
$ ./disql SYSDBA/SYSDBA001@localhost:5236

# 4.开始 SQL 操作即可

Docker Pull Command

docker pull heavenzhi1997/dm_single