forked from cyberark/conjur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (34 loc) · 1.2 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
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PORT 80
EXPOSE 80
RUN apt-get update -y && \
apt-get install -y build-essential \
curl \
git \
libpq-dev \
ldap-utils \
postgresql-client \
ruby2.5 ruby2.5-dev \
tzdata \
unattended-upgrades \
update-notifier-common \
# needed to build some gem native extensions:
libz-dev \
&& rm -rf /var/lib/apt/lists/*
RUN gem install -N -v 1.16.1 bundler
RUN mkdir -p /opt/conjur-server
WORKDIR /opt/conjur-server
COPY Gemfile \
Gemfile.lock ./
RUN bundle --without test development
COPY . .
RUN ln -sf /opt/conjur-server/bin/conjurctl /usr/local/bin/
ENV RAILS_ENV production
# The Rails initialization expects the database configuration
# and data key to exist. We supply placeholder values so that
# the asset compilation can complete.
RUN DATABASE_URL=postgresql:does_not_exist \
CONJUR_DATA_KEY=$(openssl rand -base64 32) \
bundle exec rake assets:precompile
ENTRYPOINT [ "conjurctl" ]