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`

Author

Programster

Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites. More info.