{"id":39681613,"url":"https://github.com/enmotech/enmotech-docker-opengauss","last_synced_at":"2026-01-18T09:53:30.151Z","repository":{"id":40394122,"uuid":"268431722","full_name":"enmotech/enmotech-docker-opengauss","owner":"enmotech","description":"Ennotech openGauss Docker Image","archived":false,"fork":false,"pushed_at":"2024-11-08T03:52:20.000Z","size":54813,"stargazers_count":46,"open_issues_count":3,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-08T04:24:28.313Z","etag":null,"topics":["containers","database","docker","docker-image","enmotech","opengauss"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enmotech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-01T05:18:22.000Z","updated_at":"2024-11-08T03:52:24.000Z","dependencies_parsed_at":"2024-11-08T04:24:11.211Z","dependency_job_id":null,"html_url":"https://github.com/enmotech/enmotech-docker-opengauss","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/enmotech/enmotech-docker-opengauss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enmotech%2Fenmotech-docker-opengauss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enmotech%2Fenmotech-docker-opengauss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enmotech%2Fenmotech-docker-opengauss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enmotech%2Fenmotech-docker-opengauss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enmotech","download_url":"https://codeload.github.com/enmotech/enmotech-docker-opengauss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enmotech%2Fenmotech-docker-opengauss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","database","docker","docker-image","enmotech","opengauss"],"created_at":"2026-01-18T09:53:29.484Z","updated_at":"2026-01-18T09:53:30.138Z","avatar_url":"https://github.com/enmotech.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quick Reference\n\n- **Maintainers**:\n  [EnmoTech OpenSource Team](https://github.com/enmotech)\n- **Where to get help**:\n  [Mo Tian Lun-openGauss](https://www.modb.pro/openGauss)\n\n\n\n***If you are attempting to run a container of openGauss version 5.0 or later on macOS or Windows, you should use the [`enmotech/opengauss-lite`](https://hub.docker.com/r/enmotech/opengauss-lite) version. This is because since version 5.0, the openGauss EE container cannot start up properly on macOS or Windows. However, there are no issues when running it on Linux.***\n\n\n\n# Supported Tags and `Dockerfile` Links\n\n- [`latest`](https://hub.docker.com/layers/enmotech/opengauss/latest/images/sha256-55a0c6300b84fb79034d2f9d9924557a0d040c2d9d33e51f8ae8a1eb097dad1e?context=repo)\n- [`5.1.0`](https://hub.docker.com/layers/enmotech/opengauss/5.1.0/images/sha256-0e57f4bc7352f8c8614d1883a0c4cc9199bf7b35f66ed89d0c62f45841da30bc?context=repo)\n- [`5.0.2`](https://hub.docker.com/layers/enmotech/opengauss/5.0.2/images/sha256-ff72118a989c467c2388bedaf10a3ee2141ca6c3bf9800d04f720da979a1f7fd?context=repo)\n- [`5.0.1`](https://hub.docker.com/layers/enmotech/opengauss/5.0.1/images/sha256-4c294a33fd255b618f4d1549096ab5ae230f759d0213beabf90d099a3dcd9c07?context=repo)\n- [`5.0.0`](https://hub.docker.com/layers/enmotech/opengauss/5.0.0/images/sha256-55a0c6300b84fb79034d2f9d9924557a0d040c2d9d33e51f8ae8a1eb097dad1e?context=repo)\n- [`3.1.1`](https://hub.docker.com/layers/enmotech/opengauss/3.1.1/images/sha256-95a518d150d4d1badcc2e72eae699d5ad82692d90c0c3eed0ec2ab5faec515d6?context=repo)\n- [`3.1.0`](https://hub.docker.com/layers/enmotech/opengauss/3.1.0/images/sha256-b2be542351fa26f3e6b3aabe212f470b9dfeaf7350e03e98c83bca77c77320ea?context=repo)\n- [`3.0.3`](https://hub.docker.com/layers/enmotech/opengauss/3.0.3/images/sha256-1608795fb4c376bf1b078adf56e7e8b5e7ee9eaf4c0951fdd85ea3ca19569007?context=repo)\n- [`3.0.0`](https://hub.docker.com/layers/opengauss/enmotech/opengauss/3.0.0/images/sha256-33a4f621386c6dfaa21110e1e0a8d42b16a7231591127f9553d6854cbebc3440?context=explore)\n- [`2.1.0`](https://hub.docker.com/layers/enmotech/opengauss/2.1.0/images/sha256-cd5295251e13f91ba28495f63a93587879843c34e49595caa41f6aab5b689db1?context=explore)\n- [`2.0.1`](https://hub.docker.com/layers/enmotech/opengauss/2.0.1/images/sha256-6484016276f41d600f954313d3498e9db0cc385855dc1aaff6b9da685aa48de1?context=explore)\n- [`2.0.0`](https://hub.docker.com/layers/enmotech/opengauss/2.0.0/images/sha256-2e43ab3306bf0300079726718d8b27304212eca5b49d0be418eec12d4f2ca105?context=explore)\n- [`1.1.0`](https://hub.docker.com/layers/enmotech/opengauss/1.1.0/images/sha256-004bfdb7c883d22b7731e14995c4a4ff1fe254f47cec3ddca088bea2fd133543?context=explore)\n- [`1.0.1`](https://hub.docker.com/layers/enmotech/opengauss/1.0.1/images/sha256-9e82b00802e8bd7a1b78344bbc77cc593303ca0b0c5bbb041192b360a5c89ccf?context=explore)\n- [`1.0.0`](https://hub.docker.com/layers/enmotech/opengauss/1.0.0/images/sha256-07e7a0e0c07df7c9151bd8038883e40546a9705b61b63373ebaf70dbc738c40c?context=explore)\n\n# About openGauss\n\nopenGauss is an open-source relational database management system released under the Mulan PSL v2 license. The openGauss kernel was originally derived from PostgreSQL and deeply integrates Huawei's extensive experience in the database field, continuously building competitive features tailored to enterprise needs. openGauss is also an open-source, free database platform that encourages community contributions and collaboration.\n\nopenGauss Community Official Website: [https://opengauss.org/](https://opengauss.org/)\n\n![logo](https://i.loli.net/2020/12/16/4xLt2QGOfcAgzKw.png)\n\n# Features of Enmotech openGauss Image\n\n* Enmotech closely tracks changes in the openGauss source code and releases new versions of the image promptly.\n* Enmotech's cloud database, virtual machine database, and container version database all use the same best practice initialization configuration, ensuring a nearly identical experience when dealing with various requirements.\n* Enmotech continuously releases various images for different CPU architectures (x86 or ARM) and operating systems.\n\n**Currently supports x86-64 and ARM64 architectures, automatically determined based on the machine architecture when obtaining the image.**\n\nFrom version 5.0 (including 5.0):\n\n- Enterprise edition and Lite edition separated. [`enmotech/opengauss`](https://hub.docker.com/r/enmotech/opengauss/tags) is Enterprise edition, [`enmotech/opengauss-lite`](https://hub.docker.com/r/enmotech/opengauss-lite/tags) is Lite edition.\n\nFrom version 3.0 (including 3.0):\n\n- The container uses the [openGauss Database Lite version](https://opengauss.org/zh/docs/3.0.0-lite/docs/Releasenotes/%E7%89%88%E6%9C%AC%E4%BB%8B%E7%BB%8D.html)\n- Default startup with idle memory less than 200M\n- Added basic commands such as vi, ps, etc.\n\nFrom version 2.0 (including 2.0):\n\n- openGauss for x86-64 architecture runs on the [Ubuntu 18.04 operating system](https://ubuntu.com/)\n- openGauss for ARM64 architecture runs on the [Debian 10 operating system](https://www.debian.org/)\n\nBefore version 1.1.0 (including 1.1.0):\n\n- openGauss for x86-64 architecture runs on the [CentOS 7.6 operating system](https://www.centos.org/)\n- openGauss for ARM64 architecture runs on the [openEuler 20.03 LTS operating system](https://openeuler.org/zh/)\n\n# How to Use This Image\n\n## Start an openGauss Instance\n\n```console\n$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 enmotech/opengauss:latest\n```\n\n## Environment Variables\n\nTo use the openGauss image more flexibly, additional parameters can be set. More controllable parameters will be added in future versions. The current version supports the following variables.\n\n### `GS_PASSWORD`\n\nThis parameter must be set when using the openGauss image. The value cannot be empty or undefined. This parameter sets the password for the openGauss database superuser `omm` and the test user `gaussdb`. The `omm` superuser is created by default during openGauss installation and the username cannot be changed at this time. The test user `gaussdb` is a custom-created user in the [entrypoint.sh](https://github.com/enmotech/enmotech-docker-opengauss/blob/master/1.0.1/entrypoint.sh).\n\nThe openGauss image is configured with local trust mechanism, so no password is required to connect to the database within the container. However, if connecting from outside the container (other hosts or other containers), a password must be entered.\n\n**openGauss password complexity requirements: the password must be at least 8 characters long and contain uppercase and lowercase English letters, numbers, and special characters.**\n\n### `GS_NODENAME`\n\nSpecifies the database node name. The default is `gaussdb`.\n\n### `GS_USERNAME`\n\nSpecifies the database connection username. The default is `gaussdb`.\n\n### `GS_PORT`\n\nSpecifies the database port. The default is 5432.\n\n## Connecting to the Container Database from Outside the Container\n\nopenGauss listens on port 5432 within the container by default. To access the database from outside the container, specify the `-p` parameter when running `docker run`. For example, the following command allows access to the container database using port 15432.\n\n```console\n$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Secretpassword@123 -p 15432:5432 enmotech/opengauss:latest\n```\n\nAfter successfully starting the container database with the above command, you can access the database using `gsql` from outside.\n\n```console\n$ gsql -d postgres -U gaussdb -W'Secretpassword@123' -h your-host-ip -p15432\n```\n\n## Persistent Storage Data\n\nOnce a container is deleted, all data and configurations within the container will also be lost. If you run a container from the image again, all data will be in the initial state. Therefore, for database containers, to prevent data loss due to the container's demise or damage, persistent storage of data is required. This can be achieved by specifying the `-v` parameter when running `docker run`. For example, the following command will specify storing all data files of openGauss on the host machine at /enmotech/opengauss. The `-u root` parameter is used to specify that the script is executed as the root user when the container starts, otherwise, there will be permission issues in creating the data file directory.\n\nNote: If using podman, there will be a target path check, and the target path on the host machine needs to be created in advance.\n\n```console\n$ mkdir -p /enmotech/opengauss\n$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Secretpassword@123 \\\n    -v /enmotech/opengauss:/var/lib/opengauss  -u root -p 15432:5432 \\\n    enmotech/opengauss:latest\n```\n\n## Create Master-Slave Replication openGauss Container\n\n1. Pull the container image\n2. Run the script [create_master_slave.sh](https://github.com/enmotech/enmotech-docker-opengauss/blob/master/create_master_slave.sh), enter the required parameters as prompted, or directly use the default values to automatically create two containers with a one-master-one-slave architecture of openGauss.\n\nThe above script has multiple custom parameters, the following are the parameter names (explanation) [default value].\n\n\u003e `OG_SUBNET` (Container subnet) [172.11.0.0/24]  \n\u003e `GS_PASSWORD` (Define database password) [Enmo@123]  \n\u003e `MASTER_IP` (Master database IP) [172.11.0.101]  \n\u003e `SLAVE_1_IP` (Slave database IP) [172.11.0.102]  \n\u003e `MASTER_HOST_PORT` (Master database service port) [5432]  \n\u003e `MASTER_LOCAL_PORT` (Master communication port) [5434]  \n\u003e `SLAVE_1_HOST_PORT` (Slave database service port) [6432]  \n\u003e `SLAVE_1_LOCAL_PORT` (Slave communication port) [6434]  \n\u003e `MASTER_NODENAME` (Master node name) [opengauss_master]  \n\u003e `SLAVE_NODENAME` (Slave node name) [opengauss_slave1]  \n\n### Usage Example\n\n#### Pull the Image\n\n```console\n# docker pull enmotech/opengauss:latest\n```\n\n#### Get and Run the Script to Create Master-Slave Containers\n\n```console\n# wget https://raw.githubusercontent.com/enmotech/enmotech-docker-opengauss/master/create_master_slave.sh\n# chmod +x create_master_slave.sh \n# ./create_master_slave.sh \nPlease input OG_SUBNET (Container subnet) [172.11.0.0/24]: \nOG_SUBNET set 172.11.0.0/24\nPlease input GS_PASSWORD (Define database password) [Enmo@123]: \nGS_PASSWORD set Enmo@123\nPlease input MASTER_IP (Master database IP) [172.11.0.101]: \nMASTER_IP set 172.11.0.101\nPlease input SLAVE_1_IP (Slave database IP) [172.11.0.102]: \nSLAVE_1_IP set 172.11.0.102\nPlease input MASTER_HOST_PORT (Master database service port) [5432]: \nMASTER_HOST_PORT set 5432\nPlease input MASTER_LOCAL_PORT (Master communication port) [5434]: \nMASTER_LOCAL_PORT set 5434\nPlease input SLAVE_1_HOST_PORT (Slave database service port) [6432]: \nSLAVE_1_HOST_PORT set 6432\nPlease input SLAVE_1_LOCAL_PORT (Slave communication port) [6434]: \nSLAVE_1_LOCAL_PORT set 6434\nPlease input MASTER_NODENAME [opengauss_master]: \nMASTER_NODENAME set opengauss_master\nPlease input SLAVE_NODENAME [opengauss_slave1]: \nSLAVE_NODENAME set opengauss_slave1\nPlease input openGauss VERSION [1.0.1]: \nopenGauss VERSION set 1.0.1\nstarting  \na70b46c7b2ddd1b6959403a0ac5b6783cf3f4100404fa628b8f055352a3e8567\nOpenGauss Database Network Created.\ne5430f16948639ac6a681e7f7db5ebbce8bf40c576e17ae412a3003f27b8ea14\nOpenGauss Database Master Docker Container created.\nbcb688c551b15d34196c249fdf934e4b8140a9181d6dde809c957405ec1ed29a\nOpenGauss Database Slave1 Docker Container created.\n```\n\n#### Verify Master-Slave Status\n\n```\n# docker exec -it opengauss_master /bin/bash\n# su - omm\nLast login: Thu Oct  1 23:19:49 UTC 2020 on pts/0\n$ gs_ctl query -D /var/lib/opengauss/data/\n[2020-10-01 23:21:27.685][316][][gs_ctl]: gs_ctl query ,datadir is -D \"/var/lib/opengauss/data\"  \n HA state:           \n        local_role                     : Primary\n        static_connections             : 1\n        db_state                       : Normal\n        detail_information             : Normal\n\n Senders info:       \n        sender_pid                     : 258\n        local_role                     : Primary\n        peer_role                      : Standby\n        peer_state                     : Normal\n        state                          : Streaming\n        sender_sent_location           : 0/3000550\n        sender_write_location          : 0/3000550\n        sender_flush_location          : 0/3000550\n        sender_replay_location         : 0/3000550\n        receiver_received_location     : 0/3000550\n        receiver_write_location        : 0/3000550\n        receiver_flush_location        : 0/3000550\n        receiver_replay_location       : 0/3000550\n        sync_percent                   : 100%\n        sync_state                     : Sync\n        sync_priority                  : 1\n        sync_most_available            : On\n        channel                        : 172.11.0.101:5434--\u003e172.11.0.102:53786\n\n Receiver info:      \nNo information \n```\n\n# License\n\nCopyright (c) 2011-2024 Enmotech\n\nThe license agreement follows GPL v3.0, and you can get the detailed content of the agreement from the link below.\n\n    https://github.com/enmotech/enmotech-docker-opengauss/blob/master/LICENSE\n\n# About EnmoTech\n\nEnmoTech is an Intelligent Data Technology provider established in 2011, headquartered in Beijing, with offices covering 35 regions globally including Hong Kong, Singapore and Sydney. Since its inception, EnmoTech has focused continuously on innovating and developing solutions for data and databases. Our range of solutions include HTAP DBMS, software defined distributed storage, database deployment, performance management and intelligent data analytics. More than 3,000 corporate clients with more than 50,000 business systems has been served and managed by EnmoTech. Learn more at www.emotech.com or contact apacmarketing@enmotech.com \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenmotech%2Fenmotech-docker-opengauss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenmotech%2Fenmotech-docker-opengauss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenmotech%2Fenmotech-docker-opengauss/lists"}