-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (20 loc) · 784 Bytes
/
Dockerfile
File metadata and controls
24 lines (20 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM alpine:latest
WORKDIR /usr/src/app
ENV RAILS_ENV production
ENV DEVDEPS g++ ruby-dev make libffi-dev libxml2-dev
ENV RUNDEPS ruby ruby-bundler ruby-irb ruby-json ruby-bigdecimal redis nodejs tzdata
ADD Gemfile /tmp
RUN apk update && \
apk add $RUNDEPS $DEVDEPS && \
sed -i 's/daemonize yes/daemonize no/' /etc/redis.conf && \
echo -e "---\ngem: --no-document" > /etc/gemrc && \
bundle install --without test development --gemfile=/tmp/Gemfile && \
mv /tmp/Gemfile.lock /usr/src/app && \
rm -f /tmp/Gemfile && \
apk del -r $DEVDEPS
ADD . /usr/src/app
RUN bin/bundle install --without test development && \
bin/rails assets:precompile && \
mv config/secrets.tmpl.yml config/secrets.yml && \
mv Procfile.docker Procfile
CMD foreman start