forked from blinkist/blinkist-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 761 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ruby:2.3.1-slim
ENV RAILS_ENV=test
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
ENV RUNTIME_PACKAGES pkg-config git
RUN mkdir /tmp/tmpapp
WORKDIR /tmp/tmpapp
ADD . /tmp/tmpapp
RUN echo 'gem: --no-document' >> ~/.gemrc && \
apt-get clean && apt-get update -qq && apt-get install -y build-essential $RUNTIME_PACKAGES && \
gem install bundler --version 1.12.5 && \
gem install gem-release && \
bundle update && bundle install --jobs 20 --retry 5 && \
rm -Rf /tmp/tmpapp/ && \
rm -rf /usr/share/doc/ /usr/share/man/ /usr/share/locale/ && apt-get clean
RUN mkdir /app
ADD . /app
WORKDIR /app
RUN bundle install -j1
RUN chown -R nobody:nogroup /app
RUN whoami
USER nobody
RUN whoami