This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile.standalone
48 lines (40 loc) · 1.35 KB
/
Dockerfile.standalone
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
# This dockerfile builds a standalone CLI container of the possum branch.
# It's intended to work with automated dockerhub builds.
#
# On build, it updates the conjur-api from git to make sure it's up-to-date,
# then installs the CLI system-wide.
#
# Entrypoint is bash, with `conjur` command available.
FROM ubuntu:20.04
ENV CONJUR_MAJOR_VERSION=5 \
CONJUR_VERSION=5 \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
jq \
nano \
openssh-client \
ruby2.7 ruby2.7-dev \
sudo \
vim \
tzdata && \
apt-get clean
# Install `summon` and `summon-conjur`
RUN curl -sSL https://raw.githubusercontent.com/cyberark/summon/main/install.sh \
| env TMPDIR=$(mktemp -d) bash && \
curl -sSL https://raw.githubusercontent.com/cyberark/summon-conjur/main/install.sh \
| env TMPDIR=$(mktemp -d) bash
# as per https://github.com/cyberark/summon#linux
# and https://github.com/cyberark/summon-conjur#install
ENV PATH="/usr/local/lib/summon:${PATH}"
# Install Conjur 5 CLI
# Cache a reasonable version of api-ruby & deps
RUN gem install conjur-api --pre
COPY standalone.entrypoint /bin/entry
# Update API and install everything
COPY . /usr/src/cli-ruby
RUN cd /usr/src/cli-ruby && rake install
ENTRYPOINT ["/bin/entry"]