Install CouchDB using Docker and Docker-compose


What is CouchDB?

CouchDB is an open-source NoSQL document database that stores data in JSON-based format and offers HTTP-ready REST-API  out of the box.

It can be used as a database backend for web, mobile, or even desktop apps. In contrast, it uses JSON for documents, an HTTP API, & JavaScript/declarative indexing.

Although, CouchDB can be installed on Ubuntu or Linux using Snap, many developers may require to install it using Docker.

What is Docker?

Docker is an open platform for developing, deploying, building applications that uses OS-level virtualization to pack the apps in containers.

Docker allows developers to deploy, run, maintain app containers with ease and offers a better control on the app infrastructure.

Docker runs on desktop and servers, on all known operating systems as Linux, macOS, and Windows.

What is Docker Compose?

Docker Compose is a tool that helps developer to define, run, multi-container Docker applications with ease, by just using one YAML file.

Through this file, you can define your container, services, network, ports, and all required configurations to run your app.

Docker Compose can be installed on Windows, Linux, and macOS.

In this article, we will demonstrate how to install CouchDB on Docker using Docker compose.

Install CouchDB using Docker & Docker Compose

Foremost, make sure you have Docker and Docker Compose installed.

Now let's create the docker-compose.yml file:

Here is a quick preview:

version: '3'
    image: couchdb
    restart: always
      - "5984:5984"
      - COUCHDB_USER=admin
        - ./dbdata:/opt/couchdb/data

Run your image

From the directory that contains your docker-compose.yml file, run:

docker-compose up -d

Docker will pull your image and setup everything for you.

Soon as everything set, make sure your CouchDB container is up and running, but the following command:

docker ps

Access CouchDB admin

In order to validate your working CouchDB install, head to http://localhost:5984/. To access the CouchDB admin, head to http://localhost:5984/_utils/.

CouchDB admin running on Docker
CouchDB admin running on Docker 

Access CouchDB image

If you want to access your container shell for better control, here is how (replace "YOUR_CONTAINER_NAME" with your container name):

docker exec -it YOUR_CONTAINER_NAME bash

You can use this to change your CouchDB admin credentials, and configurations.



Spectator is an open-source REST-API testing app for Linux

What is Spectator?Spectator is a free, open-source (Libre) REST-API testing program for Linux. It is written in Vala programming language and GTK. The app allows developers to make requests to test their web endpoints, create custom environ.......Read more...

Projectpad: The tool that every developer should have

Projectpad allows managing secret credentials and server information that you need to handle as a software developer or sysadmin........Read more...

How technology will help your business in 2022

Talking about the upcoming technology facilitation to businesses broadly it would be reasonable to articulate the main present time tendencies. More and more people have been addicted to undertaking hybrid involvement into work flows and t.......Read more...

Dendron converts VSCode to an intelligent Knowledge management tool

What is VSCode? Visual Studio Code or VS Code is an open-source free code editor to aid developers to build web, mobile, and desktop applications. I used it on my coding and data engineering tasks with Node.JS, Flutter, Python, and Dart. It.......Read more...

Top 13 open-source WebRTC projects to build Video conferencing and calling apps

WebRTC is an open-source framework that enables real-time communications for the web through your web browser. In contrast, it is the basic protocol that allows web apps and websites to capture and stream videos and audio and exchange data.......Read more...