Created
July 4, 2013 01:59
-
-
Save crosbymichael/5924353 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install a rethinkdb node. The node will be accessible via HTTP on port 8100. The port can be changed. | |
# After creating the image you can run: | |
# | |
# docker run -i -t rethinkdb | |
# | |
# Which will run with database storage in /var/rethinkdb on the containers file system | |
# | |
# To expose a system directory on the host: | |
# | |
# First initialize the database directory | |
# | |
# docker run -b /local/path:/var/rethinkdb -i -t rethinkdb create -d /var/rethinkdb/db | |
# | |
# Then you can run new containers that access that database. | |
# | |
# docker run -b /local/path:/var/rethinkdb -i -t rethinkdb | |
# | |
# Just don't run multiple containers using that at the same time. | |
# | |
# This image will be created to use an entrypoint. If you need to create a container | |
# with a shell you can run: | |
# | |
# docker run -i -t -entrypoint='/bin/bash' rethinkdb -i | |
# | |
# Just keep in mind that's giving you a shell in a new instance of the image not | |
# connecting you to an already running container. | |
FROM ubuntu | |
MAINTAINER Kimbro Staken "kstaken@kstaken.com" | |
RUN apt-get update | |
RUN apt-get install -y python-software-properties python less | |
RUN add-apt-repository ppa:rethinkdb/ppa | |
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y rethinkdb | |
RUN mkdir /var/rethinkdb | |
RUN rethinkdb create -d /var/rethinkdb/db | |
# Do not bind to the public port i.e. 8100:8100 | |
EXPOSE 8100 | |
# const | |
ENTRYPOINT ["rethinkdb", "-d", "/var/rethinkdb/db", "--bind", "all"] | |
# var | |
CMD ["--http-port", "8100"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment