RethinkDB on Docker

There are a number of Dockerfiles listed on the official website of RethinkDB.  These files are quite similar, but the one that seems to be most upto date is from dockerfile (follow brief instructions there to setup and run the rethinkdb container).

Run Container (1st time)

# run rethinkdb for the first time
docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 dockerfile/rethinkdb

Make sure the db is running by visiting http://localhost:8080/

Consequent Container Runs

IMPORTANT: when you start (not run) the container again you should refer to the container-id (could be found by “docker ps -a”); this is because the data-volume is connected to a specific container; running “dockerfile/rethinkdb” will create a new data volume (so the data you’ve created earlier would not be shown).  A more detailed explanation is in the comments by “Rich N”.


Import Data

Now you need to install RethinkDB drivers on your machine (not the docker container); so that you can load/import data into the db.  Here are the instructions for ubuntu (you may also need to install rethinkdb locally):

sudo apt-get install python-pip
sudo pip install rethinkdb



Here the flow is a little bit different from what you would normally do — ssh to the server and loading data on the server (for speed purposes).  Instead you would import data from your local machine into the docker container:

rethinkdb import -f users.json --table test.users

Moreover, running bash on the container (docker attach) doesn’t work since rethinkdb is specified as container’s entry point (and not bin/bash); this is done so that container would resemble the behaviour of a binary file (ref: 5. CMD and ENTRYPOINT better together).

OLD (Deprecated)

copy the Dockerfile locally from

to get the newest version replace the

  add-apt-repository -y ppa:rethinkdb/ppa && \


  add-apt-repository -y && \


newest version 1.12 1.13 rethinkdb docker ubuntu apt-get

Error when launching rethinkdb-import: No such file or directory
The rethinkdb-import command depends on the RethinkDB Python driver, which must be installed.
Instructions for installing the RethinkDB Python driver are available here:

Error when launching ‘rethinkdb-import’: No such file or directory

ubuntu install pip

Searched for rethinkdb docker 9:07am
Integrations – RethinkDB – 9:23pm
RethinkDB on Docker | Active Intelligence – 9:27pm
Welcome to wercker – Docker – 9:27pm
Docker – RethinkDB recipe | {jz} John Zanchetta – 9:27pm
Quickstart · shipyard – 9:27pm
How can i run rethinkdb-dump/export in… – 9:27pm…
earched for ubuntu install pip 9:52pm
Installation — pip 6.0.3 documentation – 9:53pm
software installation – How to install… – 9:53pm
Searched for Error when launching ‘rethinkdb-import’: No such file or directory 9:51pm
RethinkDB the importing json process… – 9:51pm
Newest ‘rethinkdb’ Questions – Stack Overflow –
Searched for docker attach entrypoint 7:25pm
Run Reference – Docker Documentation – 7:25pm
Searched for docker exec 7:20pm
Docker exec runs command on host machine… –
Searched for docker attach 7:18pm
Let the Other 95% of Great Programmers… – 6:59pm
Searched for docker entrypoint 6:49pm
docker – What is the difference between… – 6:49pm
Searched for docker attach no prompt 4:12pm
How to keep a Docker container running?… – 4:12pm
ubuntu – Docker: bash terminal starts… – 4:13pm
Interacting with container (attach) to… – 4:13pm
Searched for rethinkdb import json 4:05pm
Importing your data – RethinkDB – 4:05pm
Searched for rethinkdb 4:05pm
Searched for docker rethinkdb 4:00pm
Integrations – RethinkDB – 4:00pm
Searched for docker run bash 3:55pm
Getting Started with docker – CoreOS – 3:55pm
Docker. How to get bash\ssh inside runned… – 3:57pm
python – Docker interactive mode and… –
Searched for docker volume 3:39pm
Managing data in containers – Docker… – 3:40pm
Searched for docker rethinkdb 3:36pm
dockerfile/rethinkdb · GitHub – 3:36pm
Searched for docker attach doesnt work 3:33pm
How do you attach and detach from Docker’s… – 3:33pm
Control-C while running `docker attach`… – 3:33pm
Bug 1113608 – `docker attach` hangs… – 3:33pm
Searched for docker connect no prompt 3:30pm
how to get the terminal of a running… – 3:30pm
10 Docker Tips and Tricks That Will Make… – 3:30pm
Searched for docker rethinkdb connect 3:26pm
Deploying RethinkDB applications with… – 3:26pm
Dockerfile Best Practices – Michael Crosby – 3:26pm
How can i run rethinkdb-dump/export in… – 3:26pm
Searched for docker rethinkdb import 3:23pm
RethinkDB on Docker | Active Intelligence – 3:07pm
Building and testing a cluster of RethinkDB… – 3:07pm – SlideShare – 3:08pm
RethinkDB the importing json process… – 3:08pm
How To Create a Sharded RethinkDB Cluster… –
Searched for docker attach terminal 3:20pm
Searched for docker ssh to running container 3:12pm
Docker. How to get bash\ssh inside runned… – 3:12pm
Searched for connect to docker 3:11pm
Docker basics – Docker Documentation – 3:11pm
Searched for rethinkdb docker 3:05pm
Searched for rethinkdb import json 3:03pm
Importing your data – RethinkDB –
Searched for docker data volume does not persist 9:00pm
Docker In-depth: Volumes · Container42 – 9:01pm
How to deal with persistent storage (e.g…. – 9:01pm
How do I deploy a docker container and… – 9:01pm
Alex Collins – Docker – Persistence – 9:01pm
Why Docker Data Containers are Good — Medium – 9:01pm
Persistent Storage in Docker – Under… – 9:02pm



About Neil Rubens

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *