openGauss Docker 容器常见操作笔记

2024年 1月 12日 96.1k 0

原作者:盖国强

记录常见的 Docker 操作记录。

查看所有镜像

docker images

[root@ecs-514e-0004 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
swr.cn-east-3.myhuaweicloud.com/enmotech/mogdb 1.1.0_arm e8df8b8a4fef 3 days ago 928MB
enmotech/opengauss 1.1.0 2ecb4c3047e0 2 months ago 955MB
enmotech/opengauss latest 15a74bc57ff2 5 months ago 811MB
opengauss 1.0.0 482d4b151144 7 months ago 809MB
15501059069/lee 0811_arm fbe1a3196f0c 7 months ago 809MB
enmotech/opengauss 3c28bc0a41da 8 months ago 791MB
polardb_o_pure_software 20200515 b6c6e9acb8f8 10 months ago 1.06GB
openeuler-20.03-lts latest 84b2362d4fbd 11 months ago 531MB

查看所有的容器

docker ps -a

[root@ecs-514e-0004 ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd8385221dc7 enmotech/opengauss:1.1.0 "entrypoint.sh gauss…" 7 days ago Up 7 days 5432/tcp test
01b6dcf74a47 b6c6e9acb8f8 "python /docker_scri…" 2 weeks ago Up 2 weeks 0.0.0.0:1921->5432/tcp polardb
c506eb1eb649 enmotech/opengauss:latest "entrypoint.sh gauss…" 2 months ago Up 2 months 5432/tcp mogdb
014d9e5fb6a7 3c28bc0a41da "docker-entrypoint.s…" 4 months ago Exited (1) 4 months ago opengauss
029868a4ecf6 3c28bc0a41da "docker-entrypoint.s…" 8 months ago Exited (0) 2 months ago eygle
7bf91f34b43e 3c28bc0a41da "docker-entrypoint.s…" 8 months ago Exited (137) 7 months ago opengauss5
06271f6f2002 3c28bc0a41da "docker-entrypoint.s…" 8 months ago Exited (137) 7 months ago opengauss4
d27c6d3501cf 3c28bc0a41da "docker-entrypoint.s…" 8 months ago Up 8 months 0.0.0.0:3333->5432/tcp opengauss3
c788a9e2fc86 3c28bc0a41da "docker-entrypoint.s…" 8 months ago Up 8 months 0.0.0.0:2222->5432/tcp opengauss2

启动某一容器

docker start

[root@ecs-514e-0004 ~]# docker start 029868a4ecf6
029868a4ecf6

接入容器

docker exec -it /bin/bash

[root@ecs-514e-0004 ~]# docker exec -it eygle /bin/bash
bash: /sbin/ip: No such file or directory

Welcome to 4.19.90-2003.4.0.0036.oe1.aarch64

System information as of time: Thu Mar 11 10:24:06 CST 2021

System load: 0.21
Processes: 6
Memory used: 26.6%
Swap used: 0.0%
Usage On: 65%
IP address:
Users online: 0

接入 MogDB 数据库

[root@029868a4ecf6 /]# su - omm
Last login: Sat Dec 26 16:58:32 CST 2020 on pts/6
-bash: /sbin/ip: No such file or directory

Welcome to 4.19.90-2003.4.0.0036.oe1.aarch64

System information as of time: Thu Mar 11 10:24:20 CST 2021

System load: 0.24
Processes: 8
Memory used: 26.6%
Swap used: 0.0%
Usage On: 65%
IP address:
Users online: 0

[omm@029868a4ecf6 ~]$ gsql -d postgres -p5432
gsql ((openGauss 1.0.0 build 38a9312a) compiled at 2020-05-27 14:57:08 commit 472 last mr 549 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

postgres=#

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论