专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

couchdb Docker 镜像 - 轩辕镜像

couchdb
library/couchdb
CouchDB是采用JSON文档格式、提供HTTP API并支持JavaScript/声明式索引的数据库。
592 收藏0 次下载activelibrary镜像
🚀 生产环境还在裸拉官方镜像?一次故障=一次通宵
版本下载
🚀 生产环境还在裸拉官方镜像?一次故障=一次通宵

Quick reference

  • Maintained by:
    Apache CouchDB

  • Where to get help:
    the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow

Supported tags and respective Dockerfile links

  • latest, 3.5.1, 3.5, 3

  • 3.5.1-nouveau, 3.5-nouveau, 3-nouveau

  • 3.4.3, 3.4

  • 3.4.3-nouveau, 3.4-nouveau

Quick reference (cont.)

  • Where to file issues:
    [***]

  • Supported architectures: (more info)
    amd64, arm64v8, s390x

  • Published image artifact details:
    repo-info repo's repos/couchdb/ directory (history)
    (image metadata, transfer size, etc)

  • Image updates:
    official-images repo's library/couchdb label
    official-images repo's library/couchdb file (history)

  • Source of this description:
    docs repo's couchdb/ directory (history)

What is Apache CouchDB?

Apache CouchDB™ lets you access your data where you need it by defining the Couch Replication Protocol that is implemented by a variety of projects and products that span every imaginable computing environment from globally distributed server-clusters, over mobile phones to web browsers. Software that is compatible with the Couch Replication Protocol include PouchDB and Cloudant.

Store your data safely, on your own servers, or with any leading cloud provider. Your web- and native applications love CouchDB, because it speaks JSON natively and supports binary for all your data storage needs. The Couch Replication Protocol lets your data flow seamlessly between server clusters to mobile phones and web browsers, enabling a compelling, offline-first user-experience while maintaining high performance and strong reliability. CouchDB comes with a developer-friendly query language, and optionally MapReduce for simple, efficient, and comprehensive data retrieval.

couchdb.apache.org

!logo

How to use this image

Start a CouchDB instance

Starting a CouchDB instance is simple:

console
$ docker run -d --name my-couchdb couchdb:tag

where my-couchdb is the name you want to assign to your container, and tag is the tag specifying the CouchDB version you want. See the list above for relevant tags.

Connect to CouchDB from an application in another Docker container

This image exposes the standard CouchDB port 5984, so standard container linking will make it automatically available to the linked containers. Start your application container like this in order to link it to the Cassandra container:

console
$ docker run --name my-couchdb-app --link my-couchdb:couchdb -d app-that-uses-couchdb

Exposing CouchDB to the outside world

If you want to expose the port to the outside world, run

console
$ docker run -p 5984:5984 -d couchdb

WARNING: Do not do this until you have established an admin user and setup permissions correctly on any databases you have created.

If you intend to network this CouchDB instance with others in a cluster, you will need to map additional ports; see the official CouchDB documentation for details.

Make a cluster

Start your multiple CouchDB instances, then follow the Setup Wizard in the official CouchDB documentation to complete the process.

For a CouchDB cluster you need to provide the NODENAME setting as well as the erlang cookie. Settings to Erlang can be made with the environment variable ERL_FLAGS, e.g. ERL_FLAGS=-setcookie "brumbrum". Further information can be found here.

There is also a Kubernetes helm chart available.

Container shell access, remsh, and viewing logs

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your couchdb container:

console
$ docker exec -it my-couchdb bash

If you need direct access to the Erlang runtime:

console
$ docker exec -it my-couchdb /opt/couchdb/bin/remsh

The CouchDB log is available through Docker's container log:

console
$ docker logs my-couchdb

Configuring CouchDB

The best way to provide configuration to the couchdb image is to provide a custom ini file to CouchDB, preferably stored in the /opt/couchdb/etc/local.d/ directory. There are many ways to provide this file to the container (via short Dockerfile with FROM + COPY, via Docker Configs, via runtime bind-mount, etc), the details of which are left as an exercise for the reader.

Keep in mind that run-time reconfiguration of CouchDB will overwrite the last file in the configuration chain, and that this Docker container creates the /opt/couchdb/etc/local.d/docker.ini file at startup.

CouchDB also uses /opt/couchdb/etc/vm.args to store Erlang runtime-specific changes. Changing these values is less common. If you need to change the epmd port, for instance, you will want to bind mount this file as well. (Note: files cannot be bind-mounted on Windows hosts.)

In addition, a few environment variables are provided to set very common parameters:

  • COUCHDB_USER and COUCHDB_PASSWORD will create an ini-file based local admin user with the given username and password in the file /opt/couchdb/etc/local.d/docker.ini.
  • COUCHDB_SECRET will set the CouchDB shared cluster secret value, in the file /opt/couchdb/etc/local.d/docker.ini.
  • NODENAME will set the name of the CouchDB node inside the container to couchdb@${NODENAME}, in the file /opt/couchdb/etc/vm.args. This is used for clustering purposes and can be ignored for single-node setups.
  • Erlang Environment Variables like ERL_FLAGS will be used by Erlang itself. For a complete list have a look here

Caveats

Where to Store Data

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the couchdb images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your database data by writing the database files to disk on the host system using its own internal volume management. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /home/couchdb/data.
  2. Start your couchdb container like this:
bash
$ docker run --name some-%%REPO% -v /home/couchdb/data:/opt/couchdb/data -d couchdb:tag

The -v /home/couchdb/data:/opt/couchdb/data part of the command mounts the /home/couchdb/data directory from the underlying host system as /opt/couchdb/data inside the container, where CouchDB by default will write its data files.

No system databases until the installation is finalized

Please note that CouchDB no longer autocreates system databases for you, as it is not known at startup time if this is a single-node or clustered CouchDB installation. In a cluster, the databases must only be created once all nodes have been joined together.

If you use the Cluster Setup Wizard or the Cluster Setup API, these databases will be created for you when you complete the process.

If you choose not to use the Cluster Setup wizard or API, you will have to create _global_changes, _replicator and _users manually.

Admin party mode

The node will also start in admin party mode. Be sure to create an admin user! The Cluster Setup Wizard or the Cluster Setup API will do this for you.

You can also use the two environment variables COUCHDB_USER and COUCHDB_PASSWORD to set up an admin user:

console
$ docker run -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -d couchdb

Note that if you are setting up a clustered CouchDB, you will want to pre-hash this password and use the identical hashed text across all nodes to ensure sessions work correctly when a load *** is placed in front of the cluster. Hashing can be accomplished by running the container with the /opt/couchdb/etc/local.d directory mounted as a volume, allowing CouchDB to hash the password you set, then copying out the hashed version and using this value in the future.

Using a persistent CouchDB configuration file

The CouchDB configuration is specified in .ini files in /opt/couchdb/etc. Take a look at the CouchDB configuration documentation to learn more about CouchDB's configuration structure.

If you want to use a customized CouchDB configuration, you can create your configuration file in a directory on the host machine and then mount that directory as /opt/couchdb/etc/local.d inside the couchdb container.

console
$ docker run --name my-couchdb -v /home/couchdb/etc:/opt/couchdb/etc/local.d -d couchdb

The -v /home/couchdb/etc:/opt/couchdb/etc/local.d part of the command mounts the /home/couchdb/etc directory from the underlying host system as /opt/couchdb/etc/local.d inside the container, where CouchDB by default will write its dynamic configuration files.

You can also use couchdb as the base image for your own couchdb instance and provide your own version of the local.ini config file:

Example Dockerfile:

dockerfile
FROM couchdb

COPY local.ini /opt/couchdb/etc/

and then build and run

console
$ docker build -t you/awesome-couchdb .
$ docker run -d -p 5984:5984 you/awesome-couchdb

Remember that, with this approach, any newly written changes will still appear in the /opt/couchdb/etc/local.d directory, so it is still recommended to map this to a host path for persistence.

Logging

By default containers run from this image only log to stdout. You can enable logging to file in the configuration.

For example in local.ini:

ini
[log]
writer = file
file = /opt/couchdb/log/couch.log

It is recommended to then mount this path to a directory on the host, as CouchDB logging can be quite voluminous.

License

Apache CouchDB is licensed under the Apache License.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's couchdb/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

查看更多 couchdb 相关镜像 →
bitnami/couchdb logo
bitnami/couchdb
认证
Bitnami安全镜像,用于部署和运行Apache CouchDB数据库,提供安全加固的运行环境。
5500K+ pulls
上次更新:5 个月前
apache/couchdb logo
apache/couchdb
非官方的CouchDB便捷二进制文件,适用于RESTful文档型数据库。
2650M+ pulls
上次更新:2 个月前
budibase/couchdb logo
budibase/couchdb
CouchDB 3.X版本Docker镜像,具备搜索功能,适用于需要搜索能力的NoSQL数据库应用场景。
500K+ pulls
上次更新:1 天前
amd64/couchdb logo
amd64/couchdb
CouchDB是一款使用JSON存储文档、提供HTTP API并支持JavaScript/声明式索引的数据库。
50K+ pulls
上次更新:11 天前
arm64v8/couchdb logo
arm64v8/couchdb
CouchDB 是一个使用 JSON 存储文档、提供 HTTP API 并支持 JavaScript/声明式索引的数据库。
1350K+ pulls
上次更新:11 天前
imagenarium/couchdb logo
imagenarium/couchdb
暂无描述
100K+ pulls
上次更新:17 天前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
library/couchdb
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
提交工单
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.