{"id":23251330,"url":"https://github.com/renfei/kingbase-es-v8-r3-docker","last_synced_at":"2025-07-06T19:38:48.416Z","repository":{"id":39111547,"uuid":"391839795","full_name":"renfei/kingbase-es-v8-r3-docker","owner":"renfei","description":"人大金仓数据库管理系统（KingbaseES V8 R3) Docker 镜像","archived":false,"fork":false,"pushed_at":"2022-09-27T02:04:41.000Z","size":29538,"stargazers_count":37,"open_issues_count":3,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T19:19:18.313Z","etag":null,"topics":["database","docker","kingbase"],"latest_commit_sha":null,"homepage":"https://www.renfei.net/posts/1003506","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renfei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.dat","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-02T06:35:08.000Z","updated_at":"2025-03-14T16:49:41.000Z","dependencies_parsed_at":"2023-01-17T21:16:44.835Z","dependency_job_id":null,"html_url":"https://github.com/renfei/kingbase-es-v8-r3-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renfei/kingbase-es-v8-r3-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renfei%2Fkingbase-es-v8-r3-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renfei%2Fkingbase-es-v8-r3-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renfei%2Fkingbase-es-v8-r3-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renfei%2Fkingbase-es-v8-r3-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renfei","download_url":"https://codeload.github.com/renfei/kingbase-es-v8-r3-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renfei%2Fkingbase-es-v8-r3-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263961621,"owners_count":23536267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","docker","kingbase"],"created_at":"2024-12-19T09:17:53.630Z","updated_at":"2025-07-06T19:38:48.337Z","avatar_url":"https://github.com/renfei.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![基于Docker运行的人大金仓Kingbase数据库](./doc/image/WX202108021418082x.jpg)\n\n# 人大金仓数据库管理系统（KingbaseES V8 R3) Docker 镜像\n\n本人使用 MacOS 开发项目，无法安装人大金仓数据库，所以将人大金仓数据库封装到了 Docker，分享出来给各位程序员使用。\n\n使用的人大金仓版本号：V008R003C002B0320\n\n教程文章：[在苹果 MacOS 上基于 Docker 容器运行人大金仓（Kingbase）V8 R3 数据库的教程](https://www.renfei.net/posts/1003506)\n\n## 拉取镜像\n\n很多同学不太会构建镜像，或者懒得构建镜像，我已经将我的镜像上传至各个仓库：\n\n### Github\n\n[https://github.com/renfei/kingbase-es-v8-r3-docker/pkgs/container/kingbase](https://github.com/renfei/kingbase-es-v8-r3-docker/pkgs/container/kingbase)\n\n```bash\ndocker pull ghcr.io/renfei/kingbase:v8r3\n```\n\n### 极狐 GitLab\n\n[https://jihulab.com/renfei/kingbase-es-v8-r3-docker/container_registry/218](https://jihulab.com/renfei/kingbase-es-v8-r3-docker/container_registry/218)\n\n```bash\ndocker pull registry.jihulab.com/renfei/kingbase-es-v8-r3-docker:v8r3\n```\n\n### GitLab\n\n[https://gitlab.com/renfei/kingbase-es-v8-r3-docker/container_registry/2430544](https://gitlab.com/renfei/kingbase-es-v8-r3-docker/container_registry/2430544)\n\n```bash\ndocker pull registry.gitlab.com/renfei/kingbase-es-v8-r3-docker:v8r3\n```\n\n## 构建镜像\n\n如果您想自己构建镜像可参照以下操作：\n\n```bash\ngit clone https://github.com/renfei/kingbase-es-v8-r3-docker.git\ncd kingbase-es-v8-r3-docker\ndocker build -t kingbase:v8r3 .\n```\n\n注意 ```docker build -t kingbase:v8r3 .``` ，后面有个点（.）不能缺。\n\n国内用户可将 ```https://github.com/renfei/kingbase-es-v8-r3-docker.git``` 更换为码云地址 ```https://gitee.com/rnf/kingbase-es-v8-r3-docker.git```\n\n## 运行\n\n```bash\ndocker run -d --name kingbase -p 54321:54321 -e SYSTEM_PWD=SYSTEM -v /opt/kingbase/data:/opt/kingbase/data -v /opt/kingbase/license.dat:/opt/kingbase/Server/bin/license.dat kingbase:v8r3\n```\n\n- --name: 容器名称\n- -p: 端口映射\n- -e: 默认用户SYSTEM,通过环境变量SYSTEM_PWD指定初始化数据库时的默认用户密码\n- -v: 挂载宿主机的一个目录，这里挂载了数据目录和license文件\n\n## 截图\n\n![Docker](./doc/image/WX202108021417482x.png)\n\n![Docker](./doc/image/WX202108021418082x.png)\n\n## 常见问题\n### 启动失败\n- 启动失败，日志报 kingbase: superuser_reserved_connections must be less than max_connections\n- 原因：本仓库中的 license.dat 文件是开发测试版，限制最大连接数为10，而人大金仓配置文件默认连接数为100，导致启动失败。\n- 解决：修改数据目录下的 kingbase.conf 配置文件\n\n ```bash\n max_connect = 10\n superuser_reserved_connections = 5 #小于max_connect\n super_manager_reserved_connections = 3  #小于superuser_reserved_connections\n ```\n### FATAL: lock file kingbase.pid already exists\n- 提示：FATAL: lock file kingbase.pid already exists。是因为 docker 容器被关闭了数据库还没来得及停机，我们去数据目录下把 kingbase.pid 文件删除掉即可，数据目录就是上面映射本机目录的，我的教程里是在 /opt/kingbase/data/。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenfei%2Fkingbase-es-v8-r3-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenfei%2Fkingbase-es-v8-r3-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenfei%2Fkingbase-es-v8-r3-docker/lists"}