├── .gitignore ├── README.md ├── base └── Dockerfile ├── cloud9 └── Dockerfile ├── collectd └── Dockerfile ├── craftbukkit └── Dockerfile ├── crosscompile └── Dockerfile ├── django └── Dockerfile ├── influxdb └── Dockerfile ├── ipython └── Dockerfile ├── kafka └── Dockerfile ├── mc-coverviewer └── Dockerfile ├── minecraft └── Dockerfile ├── python └── Dockerfile ├── redis └── Dockerfile ├── rethinkdb └── Dockerfile ├── sentry ├── Dockerfile └── sentry.conf.py ├── stash ├── Dockerfile └── start.sh ├── zeromq └── Dockerfile └── zookeeper └── Dockerfile /.gitignore: -------------------------------------------------------------------------------- 1 | stash/stash 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Docker cookbooks 2 | Docker cookbooks is a collection of Dockerfiles and configs to build images the way you need them. 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y wget curl htop vim 8 | -------------------------------------------------------------------------------- /cloud9/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for cloud9 2 | 3 | FROM shykes/nodejs 4 | 5 | RUN apt-get update 6 | RUN apt-get upgrade 7 | 8 | RUN apt-get install -y openssh-server git-core libxml2-dev curl python build-essential make gcc 9 | 10 | RUN git clone git://github.com/ajaxorg/cloud9.git 11 | 12 | RUN (cd cloud9/ && npm install) 13 | EXPOSE 3131 14 | 15 | CMD /cloud9/bin/cloud9.sh -l 0.0.0.0 16 | -------------------------------------------------------------------------------- /collectd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get install -y collectd 6 | 7 | VOLUME ["/etc/collectd"] 8 | ENTRYPOINT ["collectd", "-f"] 9 | -------------------------------------------------------------------------------- /craftbukkit/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y python-software-properties 8 | RUN add-apt-repository ppa:webupd8team/java -y 9 | 10 | RUN apt-get update 11 | RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 12 | 13 | RUN apt-get install -y git curl oracle-java7-installer 14 | 15 | RUN apt-get install -y wget 16 | 17 | RUN mkdir /minecraft 18 | RUN wget -O /minecraft/craftbukkit.jar http://cbukk.it/craftbukkit-beta.jar 19 | 20 | EXPOSE 25565 21 | 22 | CMD (cd /minecraft && java -Xmx1024M -Xms768M -jar craftbukkit.jar nogui) 23 | -------------------------------------------------------------------------------- /crosscompile/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for go 1.1.2 cross compile 2 | 3 | FROM ubuntu 4 | 5 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 6 | RUN apt-get update 7 | RUN apt-get upgrade -y 8 | 9 | RUN apt-get install -y mercurial git-core 10 | 11 | RUN hg clone https://code.google.com/p/go 12 | RUN cd /go && hg update go1.1.2 13 | 14 | ENV GOROOT /go 15 | ENV GOBIN /go/bin 16 | 17 | RUN apt-get install -y gcc g++ make build-essential 18 | 19 | RUN cd /go/src && ./all.bash 20 | ENV PATH $PATH:/go/bin 21 | RUN /bin/bash -c "git clone git://github.com/davecheney/golang-crosscompile.git && source golang-crosscompile/crosscompile.bash && go-crosscompile-build-all" 22 | 23 | # Do some cool stuff here to have a container produce binaries for platforms 24 | -------------------------------------------------------------------------------- /django/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM crosbymichael/python 2 | 3 | RUN pip install psycopg2 4 | RUN pip install django 5 | 6 | EXPOSE 8080 7 | -------------------------------------------------------------------------------- /influxdb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | ADD http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb /influxdb_latest_amd64.deb 4 | RUN dpkg -i /influxdb_latest_amd64.deb 5 | 6 | EXPOSE 8083 8086 7 | 8 | VOLUME "/opt/influxdb/shared/data/db" 9 | ENTRYPOINT ["/usr/bin/influxdb"] 10 | CMD ["-config=/opt/influxdb/shared/config.toml"] 11 | -------------------------------------------------------------------------------- /ipython/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y language-pack-en 8 | ENV LANGUAGE en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LC_ALL en_US.UTF-8 11 | 12 | RUN locale-gen en_US.UTF-8 13 | RUN dpkg-reconfigure locales 14 | 15 | RUN apt-get install -y openssh-server git-core libxml2-dev curl python build-essential make gcc python-dev wget libsqlite3-dev sqlite3 16 | RUN apt-get install -y postgresql-client-9.1 postgresql-client-common libpq5 17 | RUN apt-get install -y libpq-dev 18 | 19 | RUN wget http://python-distribute.org/distribute_setup.py 20 | RUN python distribute_setup.py 21 | 22 | RUN wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py 23 | RUN python get-pip.py 24 | 25 | RUN apt-get install -y libfreetype6 libfreetype6-dev 26 | RUN apt-get install -y python-imaging libpng-dev 27 | RUN apt-get install -y libzmq-dev 28 | 29 | RUN pip install pyzmq 30 | RUN pip install numpy 31 | RUN pip install matplotlib 32 | RUN pip install pandas 33 | RUN pip install jinja2 34 | RUN pip install ipython 35 | 36 | EXPOSE 8888 37 | 38 | CMD ipython notebook --pylab=inline --ip=* --MappingKernelManager.time_to_dead=10 --MappingKernelManager.first_beat=3 39 | -------------------------------------------------------------------------------- /kafka/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | ENV DEBIAN_FRONTEND noninteractive 3 | 4 | # 5 | # - update our repo 6 | # 7 | RUN apt-get -y update 8 | RUN apt-get -y upgrade 9 | 10 | # 11 | # - install jdk8 from oracle 12 | # 13 | RUN apt-get install -y python-software-properties software-properties-common 14 | RUN add-apt-repository ppa:webupd8team/java 15 | RUN apt-get update 16 | RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 17 | RUN apt-get install -y oracle-java8-installer 18 | 19 | # 20 | # - remove defunct packages 21 | # 22 | RUN apt-get -y autoremove 23 | 24 | # 25 | # - setup kafka 0.8.x straight from their mirror 26 | # 27 | RUN wget -q -O - http://apache.mirrors.pair.com/kafka/0.8.1.1/kafka_2.9.2-0.8.1.1.tgz | tar -C /opt -xz 28 | 29 | # 30 | # - start kakfa 31 | # 32 | CMD /opt/kafka_2.9.2-0.8.1.1/bin/kafka-server-start.sh /opt/kafka_2.9.2-0.8.1.1/config/server.properties -------------------------------------------------------------------------------- /mc-coverviewer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN echo "deb http://overviewer.org/debian ./" >> /etc/apt/sources.list 8 | RUN apt-get update 9 | 10 | RUN apt-get install -y minecraft-overviewer 11 | -------------------------------------------------------------------------------- /minecraft/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | 6 | RUN apt-get install -y python-software-properties 7 | RUN add-apt-repository ppa:webupd8team/java -y 8 | 9 | RUN apt-get update 10 | RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 11 | 12 | RUN apt-get install -y oracle-java7-installer wget 13 | 14 | RUN mkdir /minecraft 15 | RUN wget -O /minecraft/minecraft.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.7.4/minecraft_server.1.7.4.jar 16 | 17 | EXPOSE 25565 18 | WORKDIR /minecraft 19 | VOLUME ["/minecraft"] 20 | ENTRYPOINT ["java", "-jar", "minecraft.jar", "nogui"] 21 | CMD ["-Xmx1024M", "-Xms768M"] 22 | -------------------------------------------------------------------------------- /python/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y language-pack-en 8 | ENV LANGUAGE en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LC_ALL en_US.UTF-8 11 | 12 | RUN locale-gen en_US.UTF-8 13 | RUN dpkg-reconfigure locales 14 | 15 | RUN apt-get install -y openssh-server git-core libxml2-dev curl python build-essential make gcc python-dev wget libsqlite3-dev sqlite3 16 | RUN apt-get install -y postgresql-client-9.1 postgresql-client-common libpq5 17 | RUN apt-get install -y libpq-dev 18 | 19 | RUN wget https://bootstrap.pypa.io/ez_setup.py 20 | RUN python ez_setup.py 21 | 22 | RUN wget https://bootstrap.pypa.io/get-pip.py 23 | RUN python get-pip.py 24 | -------------------------------------------------------------------------------- /redis/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build redis from source 2 | # Make sure you have the redis source code checked out in 3 | # the same directory as this Dockerfile 4 | FROM ubuntu 5 | 6 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 7 | RUN apt-get update 8 | RUN apt-get upgrade -y 9 | 10 | RUN apt-get install -y gcc make g++ build-essential libc6-dev tcl 11 | 12 | ADD . /redis 13 | 14 | RUN (cd /redis && make) 15 | RUN (cd /redis && make test) 16 | 17 | RUN mkdir -p /redis-data 18 | VOLUME ["/redis-data"] 19 | EXPOSE 6379 20 | 21 | ENTRYPOINT ["/redis/src/redis-server"] 22 | CMD ["--dir", "/redis-data"] 23 | -------------------------------------------------------------------------------- /rethinkdb/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for Rethinkdb 2 | # http://www.rethinkdb.com/ 3 | 4 | FROM ubuntu 5 | 6 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 7 | RUN apt-get update 8 | RUN apt-get upgrade -y 9 | 10 | RUN apt-get install -y python-software-properties 11 | RUN add-apt-repository ppa:rethinkdb/ppa 12 | RUN apt-get update 13 | RUN apt-get install -y rethinkdb 14 | 15 | # Rethinkdb process, cluster, and webui 16 | EXPOSE 28015 29015 8080 17 | 18 | VOLUME ["/rethinkdb"] 19 | WORKDIR /rethinkdb 20 | ENTRYPOINT ["/usr/bin/rethinkdb"] 21 | CMD ["--help"] 22 | -------------------------------------------------------------------------------- /sentry/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y language-pack-en 8 | ENV LANGUAGE en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LC_ALL en_US.UTF-8 11 | 12 | RUN locale-gen en_US.UTF-8 13 | RUN dpkg-reconfigure locales 14 | 15 | RUN apt-get install -y openssh-server git-core libxml2-dev curl python build-essential make gcc python-dev wget 16 | RUN apt-get install -y postgresql-client-9.1 postgresql-client-common libpq5 17 | RUN apt-get install -y libpq-dev 18 | 19 | RUN wget http://python-distribute.org/distribute_setup.py 20 | RUN python distribute_setup.py 21 | 22 | RUN wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py 23 | RUN python get-pip.py 24 | 25 | RUN pip install psycopg2 26 | RUN pip install sentry 27 | 28 | EXPOSE 9000 29 | 30 | ADD sentry.conf.py /sentry.conf.py 31 | 32 | ENTRYPOINT ["/usr/local/bin/sentry", "--config=/sentry.conf.py"] 33 | 34 | CMD ["upgrade"] 35 | -------------------------------------------------------------------------------- /sentry/sentry.conf.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | import os 3 | 4 | CONF_ROOT = os.path.dirname(__file__) 5 | 6 | database_name = os.environ.get('SENTRY_NAME', 'sentry') 7 | database_user = os.environ.get('SENTRY_USER', 'sentry') 8 | database_password = os.environ.get('SENTRY_PASS', 'sentry') 9 | database_host = os.environ.get('SENTRY_HOST', '127.0.0.1') 10 | database_port = os.environ.get('SENTRY_PORT', '') 11 | 12 | DATABASES = { 13 | 'default': { 14 | 'ENGINE': os.environ.get('SENTRY_ENGINE', 'django.db.backends.sqlite3'), # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 15 | 'NAME': database_name, # Or path to database file if using sqlite3. 16 | 'USER': database_user, # Not used with sqlite3. 17 | 'PASSWORD': database_password, # Not used with sqlite3. 18 | 'HOST': database_host, # Set to empty string for localhost. Not used with sqlite3. 19 | 'PORT': database_port, # Set to empty string for default. Not used with sqlite3. 20 | } 21 | } 22 | 23 | SENTRY_KEY = os.environ.get('SENTRY_KEY', '333dkdslyvBUGWq5bcnW9d1MZQ82qmPZB4pskKS3223fdBfuhySw==') 24 | 25 | # Set this to false to require authentication 26 | SENTRY_PUBLIC = False 27 | 28 | # You should configure the absolute URI to Sentry. It will attempt to guess it if you don't 29 | # but proxies may interfere with this. 30 | # SENTRY_URL_PREFIX = 'http://sentry.example.com' # No trailing slash! 31 | 32 | SENTRY_WEB_HOST = '0.0.0.0' 33 | SENTRY_WEB_PORT = 9000 34 | SENTRY_WEB_OPTIONS = { 35 | 'workers': 3, # the number of gunicorn workers 36 | } 37 | 38 | # Mail server configuration 39 | 40 | # For more information check Django's documentation: 41 | # https://docs.djangoproject.com/en/1.3/topics/email/?from=olddocs#e-mail-backends 42 | 43 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 44 | 45 | EMAIL_HOST = 'localhost' 46 | EMAIL_HOST_PASSWORD = '' 47 | EMAIL_HOST_USER = '' 48 | EMAIL_PORT = 25 49 | EMAIL_USE_TLS = False 50 | 51 | # http://twitter.com/apps/new 52 | # It's important that input a callback URL, even if its useless. We have no idea why, consult Twitter. 53 | TWITTER_CONSUMER_KEY = '' 54 | TWITTER_CONSUMER_SECRET = '' 55 | 56 | # http://developers.facebook.com/setup/ 57 | FACEBOOK_APP_ID = '' 58 | FACEBOOK_API_SECRET = '' 59 | 60 | # http://code.google.com/apis/accounts/docs/OAuth2.html#Registering 61 | GOOGLE_OAUTH2_CLIENT_ID = '' 62 | GOOGLE_OAUTH2_CLIENT_SECRET = '' 63 | 64 | # https://github.com/settings/applications/new 65 | GITHUB_APP_ID = '' 66 | GITHUB_API_SECRET = '' 67 | 68 | # https://trello.com/1/appKey/generate 69 | TRELLO_API_KEY = '' 70 | TRELLO_API_SECRET = '' 71 | -------------------------------------------------------------------------------- /stash/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y python-software-properties 8 | RUN add-apt-repository ppa:webupd8team/java -y 9 | 10 | RUN apt-get update 11 | RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 12 | 13 | RUN apt-get install -y git curl oracle-java7-installer 14 | RUN mkdir /stash-home 15 | 16 | ADD stash/ /stash/ 17 | ADD start.sh /start.sh 18 | 19 | ENV STASH_HOME /stash-home 20 | EXPOSE 7990 21 | 22 | CMD HOST=$(hostname) ./start.sh 23 | -------------------------------------------------------------------------------- /stash/start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "127.0.0.1 $HOST" >> /etc/hosts 4 | 5 | ./stash/bin/start-stash.sh -fg 6 | -------------------------------------------------------------------------------- /zeromq/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | ENV DEBIAN_FRONTEND noninteractive 3 | 4 | # 5 | # - update our repo 6 | # 7 | RUN apt-get -y update 8 | RUN apt-get -y upgrade 9 | 10 | # 11 | # - install git 12 | # 13 | RUN apt-get -y install python python-pip git 14 | 15 | # 16 | # - install jdk8 from oracle 17 | # 18 | RUN apt-get install -y python-software-properties software-properties-common 19 | RUN add-apt-repository ppa:webupd8team/java 20 | RUN apt-get update 21 | RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 22 | RUN apt-get install -y oracle-java8-installer 23 | 24 | # 25 | # - install building tools 26 | # 27 | RUN apt-get install make 28 | RUN apt-get install -y unzip 29 | RUN apt-get install -y build-essential 30 | RUN apt-get install -y pkg-config 31 | RUN apt-get install -y libtool 32 | RUN apt-get install -y autoconf 33 | RUN apt-get install -y automake 34 | 35 | # 36 | # - install libzmq-master 37 | # 38 | RUN git clone https://github.com/zeromq/libzmq.git 39 | RUN cd libzmq && ./autogen.sh && ./configure && make && sudo make install && sudo ldconfig 40 | 41 | # 42 | # - install zeromq-3.2.3 43 | # 44 | RUN wget http://download.zeromq.org/zeromq-3.2.3.zip 45 | RUN unzip zeromq-3.2.3.zip 46 | RUN cd zeromq-3.2.3 && ./configure && make && sudo make install && sudo ldconfig 47 | 48 | # 49 | # - install jzmq 50 | # 51 | RUN git clone https://github.com/zeromq/jzmq.git 52 | RUN cd jzmq && ./autogen.sh && ./configure && make && sudo make install && sudo ldconfig 53 | 54 | # 55 | # - set java.library.path 56 | # 57 | ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/share/java 58 | 59 | # 60 | # - remove defunct packages 61 | # 62 | RUN apt-get -y autoremove 63 | 64 | # 65 | # - copy lib files to docker default lib directory 66 | # 67 | RUN cp /usr/local/lib/libzmq.so.3.0.0 /lib/libzmq.so 68 | RUN cp /usr/local/lib/libjzmq.so.0.0.0 /lib/libjzmq.so 69 | -------------------------------------------------------------------------------- /zookeeper/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | ENV DEBIAN_FRONTEND noninteractive 3 | 4 | # 5 | # - update our repo 6 | # 7 | RUN apt-get -y update 8 | RUN apt-get -y upgrade 9 | 10 | # 11 | # - install jdk8 from oracle 12 | # 13 | RUN apt-get install -y python-software-properties software-properties-common 14 | RUN add-apt-repository ppa:webupd8team/java 15 | RUN apt-get update 16 | RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections 17 | RUN apt-get install -y oracle-java8-installer 18 | 19 | # 20 | # - remove defunct packages 21 | # 22 | RUN apt-get -y autoremove 23 | 24 | # 25 | # - setup zk 3.4.5 straight from their mirror 26 | # 27 | RUN wget -q -O - http://mirrors.sonic.net/apache/zookeeper/zookeeper-3.4.5/zookeeper-3.4.5.tar.gz | tar -C /opt -xz 28 | RUN mkdir /var/lib/zookeeper 29 | 30 | 31 | # 32 | # - start zookeeper 33 | # 34 | CMD /opt/zookeeper-3.4.5/bin/zookeeper-server-start.sh /opt/zookeeper-3.4.5/config/zookeeper.properties 35 | --------------------------------------------------------------------------------