-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
40 lines (27 loc) · 1.04 KB
/
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
ARG BASE_TAG=alpine
ARG BASE_IMG=library/ruby
ARG BUILDKIT_INLINE_CACHE=1
FROM ${BASE_IMG}:${BASE_TAG}
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 git curl tzdata build-base postgresql-dev postgresql-client libstdc++ libxml2 docker docker-compose
ADD Gemfile Gemfile.lock *.gemspec /home/app/
ADD lib/gorynich/version.rb /home/app/lib/gorynich/
ADD spec/dummy/config/database.yml /home/app/spec/dummy/config/database.yml
ARG GEM_STORAGE_AUTH
ENV BUNDLE_NEXUS__RNDS__LOCAL ${GEM_STORAGE_AUTH}
RUN set -ex \
&& gem install bundler && gem update bundler \
&& bundle install --jobs=3 \
&& rm -rf /tmp/* /var/tmp/* /usr/src/ruby /root/.gem /usr/local/bundle/cache
ONBUILD ADD . /home/app/
ONBUILD RUN set -ex \
&& bundle install --jobs=3 \
&& rm -rf /tmp/* /var/tmp/* /usr/src/ruby /root/.gem /usr/local/bundle/cache
CMD ["tail", "-f", "/dev/null"]