Dockerizing a CouchDB service (Engine)
Dockerizing a CouchDB service
Note: - If you don’t like sudo then see Giving non-root access
Here’s an example of using data volumes to share the same data between two CouchDB containers. This could be used for hot upgrades, testing different versions of CouchDB on the same data, etc.
Create first database
Note that we’re marking /var/lib/couchdb
as a data volume.
$ COUCH1=$(docker run -d -p 5984 -v /var/lib/couchdb shykes/couchdb:2013-05-03)
Add data to the first database
We’re assuming your Docker host is reachable at localhost
. If not, replace localhost
with the public IP of your Docker host.
$ HOST=localhost $ UR