Skip to content

Commit

Permalink
Merge pull request #1 from cambridge-healthcare/combining-commands
Browse files Browse the repository at this point in the history
Combining commands
  • Loading branch information
gerhard committed Dec 14, 2013
2 parents aa06b37 + b61ce5f commit 83260fb
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 56 deletions.
11 changes: 2 additions & 9 deletions Dockerfile.precise
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FROM ubuntu:12.04
MAINTAINER How are you? "docker@howareyou.com"
# MAINTAINER How are you? "docker@howareyou.com"

RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes
RUN echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
RUN apt-get update

RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl

RUN apt-get install wget
RUN echo "export HOME=/root" > /.profile; echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes; echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list; apt-get update; dpkg-divert --local --rename --add /sbin/initctl; ln -s /bin/true /sbin/initctl; apt-get install wget
18 changes: 10 additions & 8 deletions Dockerfile.redis
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM howareyou/precise
MAINTAINER How are you? "docker@howareyou.com"
FROM howareyou/ubuntu:12.04
# MAINTAINER How are you? "docker@howareyou.com"

ENV REDIS_VERSION 2.6.16

RUN apt-get install build-essential
RUN wget -O - http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz | tar -C /usr/local/src -zxv
RUN cd /usr/local/src/redis-$REDIS_VERSION && make && make install
RUN sysctl vm.overcommit_memory=1
RUN \
export REDIS_VERSION=2.6.16 ;\
apt-get install build-essential ;\
wget -O - http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz | tar -C /usr/local/src -zxv ;\
cd /usr/local/src/redis-$REDIS_VERSION && make && make install ;\
sysctl vm.overcommit_memory=1 ;\
# END RUN

CMD redis-server
EXPOSE 6379
26 changes: 14 additions & 12 deletions Dockerfile.ruby-build
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM howareyou/precise
MAINTAINER How are you? "docker@howareyou.com"
FROM howareyou/ubuntu:12.04
# MAINTAINER How are you? "docker@howareyou.com"

ENV RUBY_BUILD_VERSION 20130806

RUN apt-get install build-essential
RUN apt-get install libssl-dev
RUN apt-get install zlib1g-dev
RUN apt-get install libreadline-dev
RUN apt-get install ca-certificates

RUN wget -O - https://github.com/sstephenson/ruby-build/archive/v$RUBY_BUILD_VERSION.tar.gz | tar -C /usr/local/src -zxv
RUN cd /usr/local/src/ruby-build-$RUBY_BUILD_VERSION && sh install.sh
RUN \
echo "export RUBY_BUILD_VERSION=20131024" >> /.profile ;\
. /.profile ;\
apt-get install build-essential libffi-dev libreadline-dev libyaml-dev zlib1g-dev ;\
apt-get install libsqlite3-dev libmysqlclient-dev libmemcached-dev libmagickwand-dev ;\
apt-get install libev-dev libevent-dev ;\
apt-get install libssl-dev libcurl4-openssl-dev curl openssl ca-certificates ;\
apt-get install libxml2 libxml2-dev libxslt1-dev ;\
ruby_build_url="https://github.com/sstephenson/ruby-build/archive/v$RUBY_BUILD_VERSION.tar.gz" ;\
wget -O - $ruby_build_url | tar -C /usr/local/src -zxv ;\
cd /usr/local/src/ruby-build-$RUBY_BUILD_VERSION && sh install.sh
# END RUN
20 changes: 11 additions & 9 deletions Dockerfile.ruby.1.9
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM howareyou/ruby-build_20130806
MAINTAINER How are you? "docker@howareyou.com"
FROM howareyou/ruby-build:20131024
# MAINTAINER How are you? "docker@howareyou.com"

ENV RUBY_VERSION 1.9.3-p448
ENV PATH /usr/local/lib/$RUBY_VERSION/bin:$PATH

RUN ruby-build -v $RUBY_VERSION /usr/local/lib/$RUBY_VERSION

RUN echo "gem: --no-rdoc --no-ri" > /root/.gemrc
RUN gem install bundler foreman pry
RUN \
export RUBY_VERSION=1.9.3-p448 ;\
echo "export RUBY_VERSION=$RUBY_VERSION" >> /.profile ;\
echo "export PATH=/usr/local/lib/$RUBY_VERSION/bin:$PATH" >> /.profile ;\
. /.profile ;\
ruby-build -v $RUBY_VERSION /usr/local/lib/$RUBY_VERSION ;\
echo "gem: --no-rdoc --no-ri" > /root/.gemrc ;\
gem install bundler foreman pry ;\
# END RUN
20 changes: 11 additions & 9 deletions Dockerfile.ruby.2.0
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM howareyou/ruby-build_20130806
MAINTAINER How are you? "docker@howareyou.com"
FROM howareyou/ruby-build:20131024
# MAINTAINER How are you? "docker@howareyou.com"

ENV RUBY_VERSION 2.0.0-p247
ENV PATH /usr/local/lib/$RUBY_VERSION/bin:$PATH

RUN ruby-build -v $RUBY_VERSION /usr/local/lib/$RUBY_VERSION

RUN echo "gem: --no-rdoc --no-ri" > /root/.gemrc
RUN gem install bundler foreman pry
RUN \
export RUBY_VERSION=2.0.0-p247 ;\
echo "export RUBY_VERSION=$RUBY_VERSION" >> /.profile ;\
echo "export PATH=/usr/local/lib/$RUBY_VERSION/bin:$PATH" >> /.profile ;\
. /.profile ;\
ruby-build -v $RUBY_VERSION /usr/local/lib/$RUBY_VERSION ;\
echo "gem: --no-rdoc --no-ri" > /root/.gemrc ;\
gem install bundler foreman pry ;\
# END RUN
12 changes: 12 additions & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:12.04
# MAINTAINER How are you? "docker@howareyou.com"

RUN \
echo "export HOME=/root" > /.profile ;\
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes ;\
echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list ;\
apt-get update ;\
dpkg-divert --local --rename --add /sbin/initctl ;\
ln -s /bin/true /sbin/initctl ;\
apt-get install wget ;\
# END RUN
17 changes: 8 additions & 9 deletions mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM howareyou/precise
MAINTAINER How are you? "docker@howareyou.com"
FROM howareyou/ubuntu:12.04
# MAINTAINER How are you? "docker@howareyou.com"

ENV DEBIAN_FRONTEND noninteractive

RUN echo "mysql-server-5.5 mysql-server/start_on_boot boolean false" | debconf-set-selections

RUN chmod 777 /tmp

RUN apt-get -q install mysql-server-5.5
RUN \
. /.profile ;\
echo "mysql-server-5.5 mysql-server/start_on_boot boolean false" | debconf-set-selections ;\
chmod 777 /tmp ;\
apt-get install mysql-server-5.5 ;\
# END RUN

ADD mysql-listen.cnf /etc/mysql/conf.d/mysql-listen.cnf
ADD mysqld_start /mysqld_start
Expand Down
8 changes: 8 additions & 0 deletions supervisor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:12.04
MAINTAINER How are you? "docker@howareyou.com"

RUN apt-get install -y python-setuptools
RUN easy_install supervisor
ADD ./supervisord.conf /etc/supervisord.conf

CMD /usr/local/bin/supervisord -c /etc/supervisord.conf
9 changes: 9 additions & 0 deletions supervisor/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[supervisord]
logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=1MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)

0 comments on commit 83260fb

Please sign in to comment.