forked from jtarchie/github-pullrequest-resource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 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
33
34
35
36
37
38
39
40
41
42
43
44
# Stage: Base
FROM alpine as resource
RUN set -ex; \
apk add --update \
ca-certificates \
curl \
git \
jq \
openssh-client \
perl \
ruby \
ruby-json \
ruby-bundler \
; \
rm -rf /var/cache/apk/*;
ADD Gemfile Gemfile.lock /opt/resource/
RUN cd /opt/resource && bundle install --without test development
ADD assets/ /opt/resource/
RUN chmod +x /opt/resource/*
ADD scripts/install_git_lfs.sh install_git_lfs.sh
RUN ./install_git_lfs.sh
# Stage: Testing
FROM resource as tests
RUN apk add --update \
ruby-bundler \
ruby-io-console \
ruby-dev \
openssl-dev \
alpine-sdk
COPY Gemfile Gemfile.lock /resource/
RUN cd /resource && bundle install
COPY . /resource
RUN cd /resource && rspec
# Stage: Final
FROM resource