Install RethinkDB Inside Docker Container in Linux

Install RethinkDB Inside Docker Container in Linux

RethinkDB is a NoSQL database. Unlike traditional database systems, RethinkDB stores information in JSON-like documents. RethinkDB is an open-source project available under the Apache License 2.0.

This tutorial explains how to install RethinkDB inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install RethinkDB

  • Host network

Run the following command to create a container for RethinkDB that uses host network:

docker run -d --name=rethinkdb --restart=always --network=host \
    -v /opt/rethinkdb/data:/data \
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, RethinkDB service is listening for administrative HTTP connections on port 8080 and listening for client driver connections on port 28015. Both ports can be changed with -p option.

docker network create app-net
docker run -d --name=rethinkdb --restart=always --network=app-net \
    -p 8081:8080 -p 8082:28015 \
    -v /opt/rethinkdb/data:/data \

Testing RethinkDB

RethinkDB provides web administration UI. Open a web browser and go to http://<IP_ADDRESS>:8080, where <IP_ADDRESS> is the IP address of the system.

RethinkDB Inside Docker Container in Linux

Uninstall RethinkDB

To completely remove RethinkDB, remove its container:

docker rm --force rethinkdb

Remove RethinkDB image:

docker rmi rethinkdb

You can also remove RethinkDB data:

sudo rm -rf /opt/rethinkdb

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.