The couchdb image is built upon the phusion/baseimage (ubuntu 14.04.1 LTS) https://github.com/phusion/baseimage-docker
To pull the image:
docker pull tqhh/couchdb:v1.6.1
Run as daemon:
docker run --rm -p=8848:9999 tqhh/couchdb:v1.6.1 /sbin/my_init
Run interactive mode:
docker run -t -i -p=8848:9999 tqhh/couchdb:v1.6.1 /sbin/my_init -- bash -l
Persist data:
mkdir ~/couchdb
make sure ~/couchdb is read/write-able by couchdb user in the container (uid:1000) mount ~/couchdb when start the container
docker run -t -i -p=8848:9999 -v ~/couchdb:/usr/local/var/lib/couchdb tqhh/couchdb:v1.6.1 /sbin/my_init
8848 is the internal port; 9999 is the public port
Detach mode, run the service in background without any log print to foreground
docker run -d -p=8848:9999 -v ~/couchdb:/usr/local/var/lib/couchdb tqhh/couchdb:v1.6.1 /sbin/my_init
Test:
curl http://localhost:9999
{"couchdb":"Welcome","uuid":"f760154e1401cdc06fd0713bc20165f6","version":"1.6.1","vendor":{"version":"1.6.1","name":"The Apache Software Foundation"}}
Content type
Image
Digest
sha256:86752cf35…
Size
244.3 MB
Last updated
almost 11 years ago
docker pull tqhh/couchdb:v1.6.1.1