Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add summon and summon-conjur to pet store image #35

Merged
merged 1 commit into from
May 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]