本镜像为 Couchbase ***镜像 的 amd64 架构专用版本。Couchbase Server 是一个分布式架构的 NoSQL 文档数据库,具备内存优先架构、地理分布式部署和工作负载隔离等特性,能够在保持亚毫秒级延迟和 99.999% 可用性的同时,支持大规模关键业务应用。通过兼容 SQL 的查询语言(N1QL),可轻松实现从关系型数据库向 Couchbase Server 的迁移。
Couchbase Server 适用于以下场景:
| 标签 | Dockerfile 链接 |
|---|---|
7.6.7, enterprise, enterprise-7.6.7, latest | 链接 |
7.6.6, enterprise-7.6.6 | 链接 |
7.6.5, enterprise-7.6.5 | 链接 |
7.6.4, enterprise-7.6.4 | 链接 |
7.6.3, enterprise-7.6.3 | 链接 |
7.6.2, enterprise-7.6.2 | 链接 |
community, community-7.6.2 | 链接 |
7.6.1, enterprise-7.6.1 | 链接 |
community-7.6.1 | 链接 |
7.6.0, enterprise-7.6.0 | 链接 |
community-7.6.0 | 链接 |
7.2.7, enterprise-7.2.7 | 链接 |
7.2.6, enterprise-7.2.6 | 链接 |
7.2.5, enterprise-7.2.5 | 链接 |
7.2.4, enterprise-7.2.4 | 链接 |
community-7.2.4 | 链接 |
7.2.3, enterprise-7.2.3 | 链接 |
7.2.2, enterprise-7.2.2 | 链接 |
community-7.2.2 | 链接 |
7.2.0, enterprise-7.2.0 | 链接 |
community-7.2.0 | 链接 |
bashdocker run -d --name db \ -p 8091-8097:8091-8097 \ -p 9123:9123 \ -p ***:*** \ -p ***:*** \ -p ***:*** \ -p ***-***:***-*** \ couchbase
端口说明:Couchbase Server 根据使用场景需要暴露多个端口,详细端口用途可参考 ***文档。
访问主机的 http://localhost:8091,通过设置向导完成集群配置:
N1QL 是 Couchbase 的 SQL 兼容查询语言,可通过 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" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" - "***:***" volumes: - couchbase_data:/opt/couchbase/var ulimits: nofile: soft: 40960 hard: 40960 core: soft: *** hard: *** memlock: soft: *** hard: *** 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 ***:*** \ -p ***:*** \ -p ***:*** \ -p ***-***:***-*** \ 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=***:*** \ --ulimit memlock=***:*** \ -p 8091-8097:8091-8097 \ -p 9123:9123 \ -p ***:*** \ -p ***:*** \ -p ***:*** \ -p ***-***:***-*** \ 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 Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429