Skip to content
Merged
17 changes: 17 additions & 0 deletions java/11/chainguard/latest/detect/template/buildless/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM artifactory.tools.duckutil.net:5010/blackduck.com/chainguard-base:latest

# Update, upgrade, and add required packages
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add bash curl

RUN apk --no-cache add openjdk-11-jre

ENV BDS_JAVA_HOME=/usr/lib/jvm/java-11-openjdk
ENV PATH="${BDS_JAVA_HOME}/bin:${PATH}"

ARG DETECT_SOURCE=<detectsource>

RUN if [ $(curl --silent -L -w '%{http_code}' -o /detect.jar --create-dirs ${DETECT_SOURCE}) != "200" ]; then echo "Unable to download Detect jar from ${DETECT_SOURCE}"; exit 1; fi

ENTRYPOINT ["java", "-jar", "/detect.jar", "--detect.source.path=/source", "--detect.output.path=/output", "--detect.phone.home.passthrough.invoked.by.image=true", "--detect.accuracy.required=NONE"]
22 changes: 22 additions & 0 deletions java/11/chainguard/latest/detect/template/standard/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM artifactory.tools.duckutil.net:5010/blackduck.com/chainguard-base:latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previous comment

# Update, upgrade, and add required packages
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add bash curl

# Required for standalone nuget inspector
# Note: gcompat is not needed - Wolfi uses glibc natively (Alpine uses musl, which needed gcompat)
RUN apk --no-cache add libstdc++ icu

# Java, use headless as it brings in less dependencies
RUN apk --no-cache add openjdk-11-jre

ENV BDS_JAVA_HOME=/usr/lib/jvm/java-11-openjdk
ENV PATH="${BDS_JAVA_HOME}/bin:${PATH}"

ARG DETECT_SOURCE=<detectsource>

RUN if [ $(curl --silent -L -w '%{http_code}' -o /detect.jar --create-dirs ${DETECT_SOURCE}) != "200" ]; then echo "Unable to download Detect jar from ${DETECT_SOURCE}"; exit 1; fi

ENTRYPOINT ["java", "-jar", "/detect.jar", "--detect.source.path=/source", "--detect.output.path=/output", "--detect.phone.home.passthrough.invoked.by.image=true"]