Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (31 sloc) 1.27 KB
# Brewformulas.org web application Docker image
# ~~~~ Image base ~~~~
FROM ruby:2.3.0-slim
MAINTAINER zedtux, zedtux@zedroot.org
ENV RUNNING_IN_DOCKER true
# ~~~~ Sources Preparation ~~~~
RUN mkdir -p /brewformulas/application/
WORKDIR /brewformulas/application/
ADD . /brewformulas/application/
# ~~~~ System Dependencies ~~~~
RUN apt-get install -y ca-certificates && \
curl -L https://github.com/just-containers/skaware/releases/download/v1.16.1/s6-2.2.2.0-linux-amd64-bin.tar.gz | tar -C / -zx && \
echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list && \
curl https://download.newrelic.com/548C16BF.gpg | apt-key add - && \
apt-get update && \
apt-get install -y libpq-dev git make gcc g++ newrelic-sysmond && \
gem install rubygems-update --no-ri --no-rdoc && \
update_rubygems && \
gem install bundler --no-ri --no-rdoc && \
bundle install --without development test cucumber --jobs 8 && \
bundle exec rake assets:precompile RAILS_ENV=production && \
apt-get remove --purge -y make gcc g++ && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -f tmp/pids/*
# ~~~~ S6 files ~~~~
COPY s6 /etc/s6/
# ~~~~ Container configuration ~~~~
EXPOSE 80
ENTRYPOINT ["bundle", "exec"]
CMD ["/usr/bin/s6-svscan", "/etc/s6"]