-
Notifications
You must be signed in to change notification settings - Fork 124
/
Dockerfile.test
37 lines (28 loc) · 1.34 KB
/
Dockerfile.test
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
ARG VERSION=latest
FROM cyberark/ubuntu-ruby-builder:latest as builder
ENV CONJUR_HOME=/opt/conjur-server \
GEM_HOME=/usr/local/bundle
WORKDIR ${CONJUR_HOME}
COPY Gemfile Gemfile.lock ./
COPY ./gems/ ./gems/
RUN bundle config unset --local without && \
bundle config unset --local path && \
bundle config set --local deployment false && \
bundle config --local jobs "$(nproc --all)" && \
# this is a workaround to allow installation of ruby-debug-ide, for unknown
# reasons the first attempt to install it fails but the subsequent call is
# successful, therefore we try to install again if the first invocation fails
(bundle install || bundle install) && \
# removing CA bundle of httpclient gem
find / -name 'httpclient-*' -type d -exec find {} -name '*.pem' -type f -delete \; && \
find / -name 'httpclient-*' -type d -exec find {} -name '*.key' -type f -delete \; && \
# remove the private key in the oidc_connect gem spec directory
find / -name openid_connect -type d -exec find {} -name '*.pem' -type f -delete \;
FROM conjur:${VERSION}
ENV GEM_HOME=/usr/local/bundle
ENV PATH="${GEM_HOME}/bin:${PATH}"
RUN bundle config unset --local without && \
bundle config unset --local path && \
bundle config set --local deployment false && \
gem install rake
COPY --from=builder ${GEM_HOME} ${GEM_HOME}