|author||Garren Smith <email@example.com>||Tue Apr 25 14:35:41 2017 +0200|
|committer||Garren Smith <firstname.lastname@example.org>||Tue Apr 25 17:20:53 2017 +0200|
update 2.0-dev-docs to use new repo
Yet Another Dockerized CouchDB. Put the couch in a docker container and ship it anywhere.
If you're looking for a CouchDB with SSL support you can check out klaemo/couchdb-ssl
1.6.1: CouchDB 1.6.1
1.6.1-couchperuser: CouchDB 1.6.1 with couchperuser plugin
2.0-dev: CouchDB 2.0 RC.1 (release vote) with preconfigured dev cluster
2.0.0: CouchDB 2.0 single node
2.0-dev-docs: CouchDB 2.0 master (development version) with preconfigured dev cluster and documentation
5984of the container
Available on the docker registry as klaemo/couchdb:latest. This is a developer preview of the upcoming CouchDB 2.0 release. A data volume is exposed on
/opt/couchdb/data, and the node's port is exposed on
Please note that CouchDB no longer autocreates system tables for you, so you will have to create
_users manually (the admin interface has a “Setup” menu that does this for you). The node will also start in admin party mode!
# expose it to the world on port 5984 and use your current directory as the CouchDB Database directory [sudo] docker run -p 5984:5984 -v $(pwd):/opt/couchdb/data klaemo/couchdb 18:54:48.780 [info] Application lager started on node nonode@nohost 18:54:48.780 [info] Application couch_log_lager started on node nonode@nohost 18:54:48.780 [info] Application couch_mrview started on node nonode@nohost 18:54:48.780 [info] Application couch_plugins started on node nonode@nohost [...]
Note that you can also use the NODENAME environment variable to set the name of the CouchDB node inside the container. Once running, you can visit the new admin interface at
Available as an official image on Docker Hub as couchdb
[sudo] docker pull couchdb:latest # expose it to the world on port 5984 [sudo] docker run -d -p 5984:5984 --name couchdb couchdb curl http://localhost:5984
...or with mounted volume for the data
# expose it to the world on port 5984 and use your current directory as the CouchDB Database directory [sudo] docker run -d -p 5984:5984 -v $(pwd):/usr/local/var/lib/couchdb --name couchdb couchdb
If you want to provide your own config, you can either mount a directory at
/usr/local/etc/couchdb or extend the image and
config.ini (see Build you own).
If you need (or want) to run couchdb in
net=host mode, you can customize the port and bind address using environment variables:
This build includes the
couchperuser is a CouchDB plugin daemon that creates per-user databases github.com/etrepum/couchperuser.
[sudo] docker run -d -p 5984:5984 --name couchdb couchdb:1.6.1-couchperuser
Available on the docker registry as klaemo/couchdb:2.0-dev. This build demonstrates the CouchDB clustering features by creating a local cluster of a default three nodes inside the container, with a proxy in front. This is great for testing clustering in your local environment.
# expose the cluster to the world [sudo] docker run -it -p 5984:5984 klaemo/couchdb:2.0-dev [ * ] Setup environment ... ok [ * ] Ensure CouchDB is built ... ok [ * ] Prepare configuration files ... ok [ * ] Start node node1 ... ok [ * ] Start node node2 ... ok [ * ] Start node node3 ... ok [ * ] Check node at http://127.0.0.1:15984/ ... failed: [Errno socket error] [Errno 111] Connection refused [ * ] Check node at http://127.0.0.1:25984/ ... ok [ * ] Check node at http://127.0.0.1:35984/ ... ok [ * ] Check node at http://127.0.0.1:15984/ ... ok [ * ] Running cluster setup ... ok [ * ] Developers cluster is set up at http://127.0.0.1:15984. Admin username: root Password: 37l7YDQJ Time to hack! ...
Note: By default the cluster will be exposed on port
5984, because it uses haproxy (passes
...but you can pass arguments to the binary
docker run -it klaemo/couchdb:2.0-dev --admin=foo:bar
Note: This will overwrite the default
--with-haproxy flag. The cluster won't be exposed on port
5984 anymore. The individual nodes listen on
x5984. If you wish to expose the cluster on
# display the available options of the couchdb startup script docker run --rm klaemo/couchdb:2.0-dev --help # Enable admin party 🎉 and expose the cluster on port 5984 docker run -it -p 5984:5984 klaemo/couchdb:2.0-dev --with-admin-party-please --with-haproxy # Start two nodes (without proxy) exposed on port 15984 and 25984 docker run -it -p 15984:15984 -p 25984:25984 klaemo/couchdb:2.0-dev -n 2
You can use
klaemo/couchdb as the base image for your own couchdb instance. You might want to provide your own version of the following files:
local.inifor your custom CouchDB config
FROM klaemo/couchdb:latest COPY local.ini /usr/local/etc/couchdb/local.d/
and then build and run
[sudo] docker build -t you/awesome-couchdb . [sudo] docker run -d -p 5984:5984 -v ~/couchdb:/usr/local/var/lib/couchdb you/awesome-couchdb
2.0-single image, configuration is stored at
Please use Github issues for any questions, bugs, feature requests. :) I don't get notified about comments on Docker Hub, so I might respond really late...or not at all.