Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Deploy RethinkDB With Docker

The following script will spawn a rethinkDB database that listens to all ports and puts all of the data inside a folder on your host. You will need to take additional steps to secure the server.

#!/bin/bash

DATA_DIR="$HOME/rethinkdb-data";
mkdir $DATA_DIR

docker run -d \
-h `hostname` \
-p 8080:8080 \
-p 28015:28015 \
-p 29015:29015 \
-v $DATA_DIR:/data rethinkdb \
rethinkdb \
-d /data \
--bind all \
--canonical-address `curl icanhazip.com`
Last updated: 16th August 2018
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch