forked from lifull-dev/bucky-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (37 loc) · 873 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
33
34
35
36
37
38
39
40
41
42
43
44
FROM ruby:2.5.1-alpine
RUN apk update && \
apk add --no-cache \
alpine-sdk \
bash \
build-base \
libstdc++ \
libxml2-dev \
libxslt-dev \
linux-headers \
mysql-client \
mysql-dev \
nodejs \
ruby-dev \
ruby-json \
tzdata \
yaml \
yaml-dev \
zlib-dev
RUN gem install bundler
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
ARG rails_env
RUN echo rails_env: ${rails_env}
RUN \
echo 'gem: --no-document' >> ~/.gemrc && \
cp ~/.gemrc /etc/gemrc && \
chmod uog+r /etc/gemrc && \
bundle config --global build.nokogiri --use-system-libraries && \
bundle config --global jobs 4 && \
bundle install --with ${rails_env} && \
rm -rf ~/.gem
ADD . /app
CMD bundle exec rake assets:precompile RAILS_ENV=${RAILS_ENV}
EXPOSE 3000