CouchDB (Docker)

nEDM Experiment

CouchDB (Docker)

Repository

Sub-pages:

Starting the docker container

Setup options

  1. Mount lib directory (R/W) to /usr/local/var/lib/couchdb
  2. Mount log directory (R/W) to /usr/local/var/log/couchdb
  3. To define an admin user, export the environment variable for the hash generated by CouchDB, i.e.: -e "ADMINHASH=admin = -pbkdf2-0hashfollowshere"
  4. To define a private key that is always used by this server, export the environment variable PRIVATE_KEY, i.e.: -e "PRIVATE_KEY=private_key_to_use" If you don’t do this, then a private key will be randomly generated. Note the private keys are used when producing/checking cookies so keeping the private key the same is important for ensuring that users do not need to revalidate their cookies after a container restart. The admin hash, which provides the hashed admin password, can be found on the wiki.

Example command

docker run -d \
  -v /local_path_to_lib/couchdb:/usr/local/var/lib/couchdb \
  -v /local_path_t_log/couchdb_log:/usr/local/var/log/couchdb \
  -e "ADMINHASH=admin = -pbkdf2-HASH_OF_ADMIN_LOGIN" \
  -e "PRIVATE_KEY=private_key_to_use" \
  --name nEDM-CouchDB \
  registry.hub.docker.com/mgmarino/couchdb-docker:latest

-e parts of the command are optional. Note, if you want to test to see if the couchdb instance is running, you can export port 5984: -p 15984:5984 where the local port 15984 is used.