Created
October 25, 2013 20:00
-
-
Save joaodubas/7160966 to your computer and use it in GitHub Desktop.
docker sample
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
# arangodb | |
# | |
# VERSION: 0.0.1 | |
FROM joaodubas/common | |
MAINTAINER Joao Paulo Dubas "[email protected]" | |
# Get needed packages | |
ADD http://www.arangodb.org/repositories/stable/xUbuntu_12.10/Release.key /Release.key | |
RUN echo "deb http://www.arangodb.org/repositories/stable/xUbuntu_12.10/ /" >> /etc/apt/sources.list.d/arangodb.list | |
RUN apt-key add - < /Release.key | |
RUN rm /Release.key | |
RUN apt-get -y update | |
# Install dependencies | |
RUN apt-get install -y arangodb | |
# Change locale | |
RUN locale-gen en_US en_US.UTF-8 | |
# Add supervisor conf file | |
ADD ../common/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ADD ../common/common.conf /etc/supervisor/conf.d/common.conf | |
ADD app.conf /etc/supervisor/conf.d/app.conf | |
# Expose port 8529 for arango connectivity | |
# Expose port 22 for ssh | |
# Export port 9001 for supervisor | |
EXPOSE 8529 22 9001 | |
# Start supervisor | |
ENTRYPOINT ["/usr/bin/supervisord"] | |
CMD ["-c", "/etc/supervisor/conf.d/supervisord.conf"] |
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
# sshd & supervisor | |
# | |
# VERSION: 0.0.1 | |
FROM base:ubuntu-12.10 | |
MAINTAINER Joao Paulo Dubas "[email protected]" | |
# Update apt sources | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/source.list | |
RUN apt-get -y update | |
# Retrieve needed packages | |
RUN apt-get -y install openssh-server supervisor | |
# Prepare sshd | |
RUN mkdir -p /var/run/sshd | |
# Change locale | |
RUN locale-gen en_US en_US.UTF-8 |
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
# node.js | |
# | |
# VERSION: 0.0.1 | |
FROM joaodubas/common | |
MAINTAINER Joao Paulo Dubas "[email protected]" | |
# Retrieve needed packages | |
RUN apt-get -y update | |
RUN apt-get -y install build-essential git-core curl | |
# Change locale | |
RUN locale-gen en_US en_US.UTF-8 | |
# Add supervisor conf file | |
ADD ../common/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ADD ../common/common.conf /etc/supervisor/conf.d/common.conf | |
ADD app.conf /etc/supervisor/conf.d/app.conf | |
# Install node binary | |
ENV NODE_VERSION 0.10.21 | |
ENV NODE_FILE node-v$NODE_VERSION-linux-x64.tar.gz | |
ENV NODE_URL http://nodejs.org/v$NODE_VERSION/$NODE_FILE | |
RUN (cd /opt && curl -O $NODE_URL) | |
RUN (cd /opt && tar -xzf $NODE_FILE) | |
RUN (cd /opt && ln -s node-v$NODE_VERSION-linux-x64 nodejs) | |
RUN ln -s /opt/nodejs/bin/* /usr/local/bin | |
RUN (cd /opt && rm $NODE_FILE) | |
# Expose port 3000 for node app | |
# Expose port 22 for ssh | |
# Export port 9001 for supervisor | |
EXPOSE 3000 22 9001 | |
# Start supervisor | |
ENTRYPOINT ["/usr/bin/supervisord"] | |
CMD ["-c", "/etc/supervisor/conf.d/supervisord.conf"] |
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
# postgres | |
# | |
# VERSION: 0.0.1 | |
FROM joaodubas/common | |
MAINTAINER Joao Paulo Dubas "[email protected]" | |
# Get needed packages | |
ADD http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc /ACC4CF8.asc | |
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ quantal-pgdg main" >> /etc/apt/sources.list.d/pgdg.list | |
RUN apt-key add - < /ACC4CF8.asc | |
RUN rm /ACC4CF8.asc | |
RUN apt-get -y update | |
# Install dependencies | |
RUN apt-get install -y postgresql postgresql-contrib | |
# Change locale | |
RUN locale-gen en_US en_US.UTF-8 | |
# Add supervisor conf file | |
ADD ../common/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ADD ../common/common.conf /etc/supervisor/conf.d/common.conf | |
ADD app.conf /etc/supervisor/conf.d/app.conf | |
# Expose port 5432 for postgres connectivity | |
# Expose port 22 for ssh | |
# Export port 9001 for supervisor | |
EXPOSE 5432 22 9001 | |
# Start supervisor | |
ENTRYPOINT ["/usr/bin/supervisord"] | |
CMD ["-c", "/etc/supervisor/conf.d/supervisord.conf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment