Skip to content

Latest commit

 

History

History
99 lines (71 loc) · 1.96 KB

README.org

File metadata and controls

99 lines (71 loc) · 1.96 KB

Running CouchDB in docker

Contents

Select the version of the docker image

IMAGE=couchdb
TAG=3.1.1

Set container name

NAME=couchdb

Pull the docker image

docker pull $IMAGE:$TAG

Configure CouchDB

Contents of the .env file.

COUCHDB_USER=user
COUCHDB_PASSWORD=secretpassword

Set the local data directory

LOCAL_DATA_DIR=`pwd`/data

Set the network parameters

INTERFACE=127.0.0.1
PORT=5984

Run CouchDB

docker run -d --name $NAME --env-file .env -p $INTERFACE:$PORT:5984 \
    -v "$LOCAL_DATA_DIR:/opt/couchdb/data" $IMAGE:$TAG

Inspect the container

docker inspect $NAME

See the container logs

docker logs $NAME

Kill the container

docker kill $NAME

Remove the container

docker rm $NAME

Remove the data directory

rm -rf data

References

  1. https://hub.docker.com/_/couchdb/