Using RethinkDB with Docker

Other topics

Basic usage

By default, RethinkDB binds all services to 127.0.0.1. So this following example will persist data to the host_data_path on the container's host machine and available to 127.0.0.1 on the standard ports.

ServiceFlagDefault Port
Driver--driver-port28015
Cluster--cluster-port29015
HTTP WebUI--http-port8080
docker run -d -v host_data_path:/data rethinkdb 

To open up the driver and cluster port to the external traffic you must specify the address of local interfaces or provide all.

docker run -d -v host_data_path:/data rethinkdb --bind all 

Binding WebUI to localhost or disabling

When deploying RethinkDB in production, you want to either turn off or lock down the WebUI. This will only respond to localhost to access the WebUI allowing you to SSH Tunnel to the host machine and access it for diagnostics and troubleshooting.

docker run -d \
   -v host_data_path:/data \
   rethinkdb \
   rethinkdb --bind-cluster all --bind-driver all --bind-http 127.0.0.1 -d /data

If you'd like to completely turn off the WebUI:

docker run -d \
  -v host_data_path:/data \
  rethinkdb \
  rethinkdb --bind-cluster all --bind-driver all --no-http-admin -d /data

Contributors

Topic Id: 4499

Example Ids: 15748,15749

This site is not affiliated with any of the contributors.