本镜像为 https://hub.docker.com/_/couchbase 的 amd64 架构专用版本。Couchbase Server 是一个分布式架构的 NoSQL 文档数据库,具备内存优先架构、地理分布式部署和工作负载隔离等特性,能够在保持亚毫秒级延迟和 99.999% 可用性的同时,支持大规模关键业务应用。通过兼容 SQL 的查询语言(N1QL),可轻松实现从关系型数据库向 Couchbase Server 的迁移。
Couchbase Server 适用于以下场景:
| 标签 | Dockerfile 链接 |
|---|---|
7.6.7, enterprise, enterprise-7.6.7, latest | https://github.com/couchbase/docker/blob/a322cc7110124b2581339f52d88bab80fb50016d/enterprise/couchbase-server/7.6.7/Dockerfile |
7.6.6, enterprise-7.6.6 | https://github.com/couchbase/docker/blob/9ce3cbc835dd4e072943ac7878aa7f87d6b95178/enterprise/couchbase-server/7.6.6/Dockerfile |
7.6.5, enterprise-7.6.5 | https://github.com/couchbase/docker/blob/ec16abff6f0551ced6c771bd5606a4392379dd31/enterprise/couchbase-server/7.6.5/Dockerfile |
7.6.4, enterprise-7.6.4 | https://github.com/couchbase/docker/blob/9990e2cfabc94b37607e5666d9ef1eab69a397a6/enterprise/couchbase-server/7.6.4/Dockerfile |
7.6.3, enterprise-7.6.3 | https://github.com/couchbase/docker/blob/553d1baa4aa90fe506e1d7bcdf4daec387a110fe/enterprise/couchbase-server/7.6.3/Dockerfile |
7.6.2, enterprise-7.6.2 | https://github.com/couchbase/docker/blob/ce13f602d2c95f76835c67a8855d5e73480973a6/enterprise/couchbase-server/7.6.2/Dockerfile |
community, community-7.6.2 | https://github.com/couchbase/docker/blob/3f81af158b7f307e42f8c42ceaf7657b2690bfca/community/couchbase-server/7.6.2/Dockerfile |
7.6.1, enterprise-7.6.1 | https://github.com/couchbase/docker/blob/966143f937bfe6979b7c09b86684004fdd21e5b8/enterprise/couchbase-server/7.6.1/Dockerfile |
community-7.6.1 | https://github.com/couchbase/docker/blob/a***c9b23efba391317fd21f898bf64dff6ec1/community/couchbase-server/7.6.1/Dockerfile |
7.6.0, enterprise-7.6.0 | https://github.com/couchbase/docker/blob/9bdcf41deedd86da4c71347ffeea350a9895d816/enterprise/couchbase-server/7.6.0/Dockerfile |
community-7.6.0 | https://github.com/couchbase/docker/blob/6d669d0e34e6990b43c1b91ea74720235c96c4ac/community/couchbase-server/7.6.0/Dockerfile |
7.2.7, enterprise-7.2.7 | https://github.com/couchbase/docker/blob/23887cae4fd6ce054f383d524a7975d2e3a6b72e/enterprise/couchbase-server/7.2.7/Dockerfile |
7.2.6, enterprise-7.2.6 | https://github.com/couchbase/docker/blob/181af64dcbedc1abf6e0916d9f5373cf1c18cb6e/enterprise/couchbase-server/7.2.6/Dockerfile |
7.2.5, enterprise-7.2.5 | https://github.com/couchbase/docker/blob/94d97d9eea3d4057846be28f319940927d5166cb/enterprise/couchbase-server/7.2.5/Dockerfile |
7.2.4, enterprise-7.2.4 | https://github.com/couchbase/docker/blob/15c1c3c0b4717a8b23ef7962f3fde28fe68e4311/enterprise/couchbase-server/7.2.4/Dockerfile |
community-7.2.4 | https://github.com/couchbase/docker/blob/7c8453ef8584ff18f7b6c052828758693af4f72c/community/couchbase-server/7.2.4/Dockerfile |
7.2.3, enterprise-7.2.3 | https://github.com/couchbase/docker/blob/b54049418018144369816d18c63d9bf76e34bc9f/enterprise/couchbase-server/7.2.3/Dockerfile |
7.2.2, enterprise-7.2.2 | https://github.com/couchbase/docker/blob/3515fb617a469a5f46d492cf6910dddff8efb825/enterprise/couchbase-server/7.2.2/Dockerfile |
community-7.2.2 | https://github.com/couchbase/docker/blob/c7a25ac7f38a81a465aa97f1a1d753a6c579954f/community/couchbase-server/7.2.2/Dockerfile |
7.2.0, enterprise-7.2.0 | https://github.com/couchbase/docker/blob/4e769975179dc4e5bf4138349818bc8a0e191c9f/enterprise/couchbase-server/7.2.0/Dockerfile |
community-7.2.0 | https://github.com/couchbase/docker/blob/71596d088ce2bc0218418187ac40ffccb08dbc36/community/couchbase-server/7.2.0/Dockerfile |
步骤 1:运行 Couchbase Server 容器
bashdocker run -d --name db \ -p 8091-8097:8091-8097 \ -p 9123:9123 \ -p 11207:11207 \ -p 11210:11210 \ -p 11280:11280 \ -p 18091-18097:18091-18097 \ couchbase
端口说明:Couchbase Server 根据使用场景需要暴露多个端口,详细端口用途可参考 官方文档。
步骤 2:通过 Web 控制台完成初始化设置
访问主机的 http://localhost:8091,通过设置向导完成集群配置:
N1QL 是 Couchbase 的 SQL 兼容查询语言,可通过 Web 控制台或命令行执行:
Web 控制台方式
http://localhost:8091 并登录sqlSELECT name FROM `beer-sample` WHERE brewery_id="mishawaka_brewing";
命令行方式
bashdocker exec -it db cbq --user Administrator cbq> SELECT name FROM `beer-sample` WHERE brewery_id="mishawaka_brewing";
Couchbase 提供多语言 SDK(C、Go、Java、.NET、Node.js、PHP、Python 等),应用程序可通过 http://localhost:8091/pools 连接到容器化集群。
示例 Java SDK 连接代码:
javaCluster cluster = Cluster.connect("localhost", "Administrator", "password"); Bucket bucket = cluster.bucket("beer-sample"); Collection collection = bucket.defaultCollection();
yamlversion: '3.8' services: couchbase: image: couchbase:latest container_name: couchbase-node1 ports: - "8091:8091" - "8092:8092" - "8093:8093" - "8094:8094" - "8095:8095" - "8096:8096" - "8097:8097" - "9123:9123" - "11207:11207" - "11210:11210" - "11280:11280" - "18091:18091" - "18092:18092" - "18093:18093" - "18094:18094" - "18095:18095" - "18096:18096" - "18097:18097" volumes: - couchbase_data:/opt/couchbase/var ulimits: nofile: soft: 40960 hard: 40960 core: soft: 100000000 hard: 100000000 memlock: soft: 100000000 hard: 100000000 restart: unless-stopped volumes: couchbase_data:
详细系统要求参考 官方文档。
Couchbase 容器的持久化数据默认存储在 /opt/couchbase/var,建议通过 -v 参数映射到主机目录:
bashmkdir -p ~/couchbase/data docker run -d --name db \ -v ~/couchbase/data:/opt/couchbase/var \ -p 8091-8097:8091-8097 \ -p 9123:9123 \ -p 11207:11207 \ -p 11210:11210 \ -p 11280:11280 \ -p 18091-18097:18091-18097 \ couchbase
SELinux 环境注意事项:
bashmkdir ~/couchbase/data && chcon -Rt svirt_sandbox_file_t ~/couchbase/data
Couchbase 生产环境需要调整 ulimit 设置以确保性能和稳定性:
bashdocker run -d --name db \ --ulimit nofile=40960:40960 \ --ulimit core=100000000:100000000 \ --ulimit memlock=100000000:100000000 \ -p 8091-8097:8091-8097 \ -p 9123:9123 \ -p 11207:11207 \ -p 11210:11210 \ -p 11280:11280 \ -p 18091-18097:18091-18097 \ couchbase
生产环境建议使用 --net=host 模式避免网络性能损耗和 NAT 问题:
bashdocker run -d --name db --net=host couchbase
所有容器运行在同一物理机,适用于开发和测试环境,但存在资源竞争和单点故障风险:
┌──────────────────────────────────────────────────────────┐ │ 主机 OS (Linux) │ │ │ │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ │ │ 容器 OS │ │ 容器 OS │ │ 容器 OS │ │ │ │ (Ubuntu) │ │ (Ubuntu) │ │ (Ubuntu) │ │ │ │ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │ │ │ │ │ Couchbase │ │ │ │ Couchbase │ │ │ │ Couchbase │ │ │ │ │ │ Server │ │ │ │ Server │ │ │ │ Server │ │ │ │ │ └───────────┘ │ │ └───────────┘ │ │ └───────────
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务