forked from RND-SOFT/lusnoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 955 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
ARG RUBY_VERSION=2.5
FROM ruby:${RUBY_VERSION}-alpine
WORKDIR /home/app
RUN mkdir -p /usr/local/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc \
&& echo 'gem: --no-document' > ~/.gemrc
RUN set -ex \
&& apk add --no-cache build-base git curl
ADD Gemfile Gemfile.lock *.gemspec /home/app/
ADD lib/lusnoc/version.rb /home/app/lib/lusnoc/
RUN set -ex \
&& curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter \
&& chmod +x cc-test-reporter \
&& gem install bundler && gem update bundler \
&& bundle install --jobs=3 \
&& gem cleanup \
&& rm -rf /tmp/* /var/tmp/* /usr/src/ruby /root/.gem /usr/local/bundle/cache
ADD . /home/app/
RUN set -ex \
&& bundle install --jobs=3 \
&& gem cleanup \
&& rm -rf /tmp/* /var/tmp/* /usr/src/ruby /root/.gem /usr/local/bundle/cache
CMD ["tail", "-f", "/dev/null"]