Skip to content

Commit

Permalink
Add summon and summon-conjur to pet store image
Browse files Browse the repository at this point in the history
This simplifies usage of the pet store app which at times needs a separate setup to add summon
  • Loading branch information
doodlesbykumbi authored May 20, 2021
1 parent 70be07e commit 4cedcef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# This Dockerfile leverages multi-stage builds.
# See https://docs.docker.com/develop/develop-images/multistage-build/

# STAGE:
# Fetch summon

FROM ruby:2.4 as summon

RUN apt-get update && \
apt-get install -y --no-install-recommends curl

# Install summon and summon-conjur
RUN curl -sSL https://raw.githubusercontent.com/cyberark/summon/master/install.sh \
| env TMPDIR=$(mktemp -d) bash && \
curl -sSL https://raw.githubusercontent.com/cyberark/summon-conjur/master/install.sh \
| env TMPDIR=$(mktemp -d) bash

# STAGE:
# The 'maven' base is used to package the application
FROM maven:3.6.3-jdk-11-slim as maven
Expand All @@ -24,6 +38,8 @@ RUN mvn package && cp target/petstore-*.jar app.jar
FROM openjdk:11-jre-slim
MAINTAINER CyberArk

COPY --from=summon /usr/local/lib/summon /usr/local/lib/summon
COPY --from=summon /usr/local/bin/summon /usr/local/bin/summon
COPY --from=maven /app/app.jar /app.jar

ENTRYPOINT [ "java", "-jar", "/app.jar"]

0 comments on commit 4cedcef

Please sign in to comment.