Skip to content

Commit

Permalink
SecHub server switch default to Temurin Java #2384
Browse files Browse the repository at this point in the history
changes for the pds-base image
  • Loading branch information
sven-dmlr committed Nov 3, 2023
1 parent 4476b11 commit 4d765b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sechub-pds-solutions/pds-base/docker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# install-java/ is copied by the build scripts from ../../../sechub-solutions-shared/
# so we exclude it here from git
install-java/
18 changes: 16 additions & 2 deletions sechub-pds-solutions/pds-base/docker/PDS-Debian.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ARG PDS_VERSION
ARG BUILD_TYPE
ARG GO="go1.20.4.linux-amd64.tar.gz"

# possible values: temurin, openj9, openjdk
ARG JAVA_DISTRIBUTION="temurin"
# possible values: 17
ARG JAVA_VERSION="17"

Expand Down Expand Up @@ -42,7 +44,7 @@ RUN mkdir --parent "$PDS_ARTIFACT_FOLDER" "$DOWNLOAD_FOLDER"
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade --assume-yes --quiet && \
apt-get install --quiet --assume-yes wget w3m git "openjdk-$JAVA_VERSION-jdk-headless" && \
apt-get install --quiet --assume-yes wget w3m git && \
apt-get clean

# Install Go
Expand All @@ -60,6 +62,12 @@ RUN cd "$DOWNLOAD_FOLDER" && \
# remove go tar.gz
rm "$GO"

COPY --chmod=755 install-java/debian "$DOWNLOAD_FOLDER/install-java/"

# Install Java
RUN cd "$DOWNLOAD_FOLDER/install-java/" && \
./install-java.sh "$JAVA_DISTRIBUTION" "$JAVA_VERSION" jdk

# Copy clone script
COPY --chmod=755 clone.sh "$BUILD_FOLDER/clone.sh"

Expand Down Expand Up @@ -169,9 +177,15 @@ COPY --from=builder "$PDS_ARTIFACT_FOLDER" "$PDS_FOLDER"
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade --assume-yes --quiet && \
apt-get install --assume-yes --quiet "openjdk-$JAVA_VERSION-jre-headless" tree && \
apt-get install --assume-yes --quiet tree && \
apt-get clean

COPY --chmod=755 install-java/debian "$DOWNLOAD_FOLDER/install-java/"

# Install Java
RUN cd "$DOWNLOAD_FOLDER/install-java/" && \
./install-java.sh "$JAVA_DISTRIBUTION" "$JAVA_VERSION" jre

# Copy run script into the container
COPY run.sh /run.sh

Expand Down

0 comments on commit 4d765b1

Please sign in to comment.