Pages

Sunday, January 12, 2014

CouchDB Server on Fedora, Using Docker

In just a few simple steps, you can have an instance of CouchDB up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker:

# docker version

To build:

Copy the sources down, then -

# docker build -rm -t /couchdb .

To run:

# docker run -d -p 5984:5984 /couchdb

Test:

# curl -X PUT http://localhost:5984/test/ {"error":"file_exists","reason":"The database could not be created, the file already exists."}

# curl -X GET http://localhost:5984/test/ {"db_name":"test","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,
"compact_running":false,"disk_size":79,"data_size":0,"instance_start_time":" 1387384723608413"}

This is what it looks like. Enjoy the Asciicast.

No comments:

Post a Comment