From 91608e6092f8ebda9eeb748a446a602ca7bf99b2 Mon Sep 17 00:00:00 2001 From: Michal Broz Date: Thu, 20 Jul 2023 23:13:24 -0500 Subject: [PATCH 1/4] revert ubuntu based images back to single stage --- ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 | 34 ++++-------- ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 | 30 +++------- ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 | 30 +++------- ga/23.0.0.6/kernel/Dockerfile.ubuntu.ibmjava8 | 55 ++++++------------- .../kernel/Dockerfile.ubuntu.openjdk11 | 52 ++++++------------ .../kernel/Dockerfile.ubuntu.openjdk17 | 52 ++++++------------ ga/latest/full/Dockerfile.ubuntu.ibmjava8 | 34 ++++-------- ga/latest/full/Dockerfile.ubuntu.openjdk11 | 30 +++------- ga/latest/full/Dockerfile.ubuntu.openjdk17 | 30 +++------- ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 | 55 ++++++------------- ga/latest/kernel/Dockerfile.ubuntu.openjdk11 | 52 ++++++------------ ga/latest/kernel/Dockerfile.ubuntu.openjdk17 | 52 ++++++------------ 12 files changed, 148 insertions(+), 358 deletions(-) diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 index b5583be27..a437bca4c 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 @@ -12,33 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava AS installBundle -ARG VERBOSE=false -ARG REPOSITORIES_PROPERTIES="" +FROM websphere-liberty:kernel-java8-ibmjava -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - -# Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; +USER root -FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava ARG VERBOSE=false +ARG REPOSITORIES_PROPERTIES="" -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +# Install the base bundle +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ @@ -46,4 +33,3 @@ COPY --chown=1001:0 server.xml /config/ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \ && find /opt/ibm/wlp/output ! -path "*.classCache*" ! -perm -g=rwx -print0 | xargs -0 -r chmod g+rwx - diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 index d983f604e..a28e2d432 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 @@ -12,36 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:23.0.0.6-kernel-java11-openj9 AS installBundle +FROM websphere-liberty:kernel-java11-openj9 USER root ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - # Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; - -FROM websphere-liberty:23.0.0.6-kernel-java11-openj9 -ARG VERBOSE=false - -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 index 28fb016dd..d3a5494eb 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 @@ -12,36 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:23.0.0.6-kernel-java17-openj9 AS installBundle +FROM websphere-liberty:kernel-java17-openj9 USER root ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - # Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; - -FROM websphere-liberty:23.0.0.6-kernel-java17-openj9 -ARG VERBOSE=false - -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ diff --git a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.ibmjava8 b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.ibmjava8 index 0b58a7f43..1b3b88a7e 100644 --- a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.ibmjava8 +++ b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.ibmjava8 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibmjava:8-jre AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibmjava:8-jre USER root @@ -95,20 +69,27 @@ RUN set -eux; \ curl -LfsSo /usr/bin/dumb-init ${DUMB_INIT_URL}; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; \ - apt-get purge --auto-remove -y wget; \ + apt-get purge --auto-remove -y curl; \ rm -rf /var/lib/apt/lists/*; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" -RUN apt-get install -y --no-install-recommends openssl \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget openssl \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ + && chown -R 1001:0 /opt/ibm/wlp \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts diff --git a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 index 4978eb1fa..27546784c 100644 --- a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 +++ b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibm-semeru-runtimes:open-11-jre-focal AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibm-semeru-runtimes:open-11-jre-focal USER root @@ -94,17 +68,23 @@ RUN set -eux; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses - -RUN apt-get install -y --no-install-recommends openssl \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts diff --git a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 index 7fe7d2e8c..96137b5eb 100644 --- a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 +++ b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibm-semeru-runtimes:open-17-jre-focal AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibm-semeru-runtimes:open-17-jre-focal USER root @@ -94,17 +68,23 @@ RUN set -eux; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses - -RUN apt-get install -y --no-install-recommends openssl \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts diff --git a/ga/latest/full/Dockerfile.ubuntu.ibmjava8 b/ga/latest/full/Dockerfile.ubuntu.ibmjava8 index 395a6922a..a437bca4c 100644 --- a/ga/latest/full/Dockerfile.ubuntu.ibmjava8 +++ b/ga/latest/full/Dockerfile.ubuntu.ibmjava8 @@ -12,33 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel AS installBundle -ARG VERBOSE=false -ARG REPOSITORIES_PROPERTIES="" +FROM websphere-liberty:kernel-java8-ibmjava -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - -# Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; +USER root -FROM websphere-liberty:kernel ARG VERBOSE=false +ARG REPOSITORIES_PROPERTIES="" -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +# Install the base bundle +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ @@ -46,4 +33,3 @@ COPY --chown=1001:0 server.xml /config/ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \ && find /opt/ibm/wlp/output ! -path "*.classCache*" ! -perm -g=rwx -print0 | xargs -0 -r chmod g+rwx - diff --git a/ga/latest/full/Dockerfile.ubuntu.openjdk11 b/ga/latest/full/Dockerfile.ubuntu.openjdk11 index 02fd841cd..a28e2d432 100644 --- a/ga/latest/full/Dockerfile.ubuntu.openjdk11 +++ b/ga/latest/full/Dockerfile.ubuntu.openjdk11 @@ -12,36 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel-java11-openj9 AS installBundle +FROM websphere-liberty:kernel-java11-openj9 USER root ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - # Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; - -FROM websphere-liberty:kernel-java11-openj9 -ARG VERBOSE=false - -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ diff --git a/ga/latest/full/Dockerfile.ubuntu.openjdk17 b/ga/latest/full/Dockerfile.ubuntu.openjdk17 index 1241066c1..d3a5494eb 100644 --- a/ga/latest/full/Dockerfile.ubuntu.openjdk17 +++ b/ga/latest/full/Dockerfile.ubuntu.openjdk17 @@ -12,36 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel-java17-openj9 AS installBundle +FROM websphere-liberty:kernel-java17-openj9 USER root ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" -# If there is a local copy of the repository use that instead -COPY resources/ /tmp/ - # Install the base bundle -RUN set -eux; \ - if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ - mkdir /opt/ibm/wlp/etc/; \ - echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ - installUtility install --acceptLicense baseBundle; \ - rm /opt/ibm/wlp/etc/repositories.properties; \ - elif [ -f /tmp/wlpRepo.zip ]; then \ - installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ - else \ - installUtility install --acceptLicense baseBundle; \ - fi; \ - rm -rf /output/workarea /output/logs; \ - find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; - -FROM websphere-liberty:kernel-java17-openj9 -ARG VERBOSE=false - -# Copy the runtime -COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp +RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ + && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ + && installUtility install --acceptLicense baseBundle \ + && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ + && rm -rf /output/workarea /output/logs \ + && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw COPY --chown=1001:0 server.xml /config/ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 b/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 index 0b58a7f43..1b3b88a7e 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 +++ b/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibmjava:8-jre AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibmjava:8-jre USER root @@ -95,20 +69,27 @@ RUN set -eux; \ curl -LfsSo /usr/bin/dumb-init ${DUMB_INIT_URL}; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; \ - apt-get purge --auto-remove -y wget; \ + apt-get purge --auto-remove -y curl; \ rm -rf /var/lib/apt/lists/*; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" -RUN apt-get install -y --no-install-recommends openssl \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget openssl \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ + && chown -R 1001:0 /opt/ibm/wlp \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 index 4978eb1fa..27546784c 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibm-semeru-runtimes:open-11-jre-focal AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibm-semeru-runtimes:open-11-jre-focal USER root @@ -94,17 +68,23 @@ RUN set -eux; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses - -RUN apt-get install -y --no-install-recommends openssl \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 index 7fe7d2e8c..96137b5eb 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 @@ -12,32 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ibm-semeru-runtimes:open-17-jre-focal AS getRuntime - -USER root - -ARG VERBOSE=false - -# Install WebSphere Liberty -ARG LIBERTY_VERSION=23.0.0.6 -ARG LIBERTY_URL -ARG DOWNLOAD_OPTIONS="" - -# If there is a local copy of the image use that instead -COPY resources/ /tmp/ - -RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget openssl \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /licenses/ \ - && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ - && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ - && unzip -q /tmp/wlp.zip -d /opt/ibm \ - && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp \ - && cp -a /opt/ibm/wlp/lafiles/. /licenses/ - FROM ibm-semeru-runtimes:open-17-jre-focal USER root @@ -94,17 +68,23 @@ RUN set -eux; \ echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ chmod +x /usr/bin/dumb-init; -# Add default user 1001 and create wlp with right user/permissions before copying -RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ - && mkdir -p /opt/ibm/wlp \ +# Install WebSphere Liberty +ARG LIBERTY_URL +ARG DOWNLOAD_OPTIONS="" +RUN apt-get update \ + && apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /licenses/ \ + && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ + && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ + && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ + && unzip -q /tmp/wlp.zip -d /opt/ibm \ + && rm /tmp/wlp.zip \ && chown -R 1001:0 /opt/ibm/wlp \ - && chmod -R g+rw /opt/ibm/wlp - -# Copy the runtime and licenses -COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp -COPY --from=getRuntime /licenses /licenses - -RUN apt-get install -y --no-install-recommends openssl \ + && chmod -R g+rw /opt/ibm/wlp \ + && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ + && apt-get purge --auto-remove -y unzip \ + && apt-get purge --auto-remove -y wget \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts From abd609904b6dc3b10e83390816de9b75fd6ea388 Mon Sep 17 00:00:00 2001 From: Michal Broz Date: Fri, 21 Jul 2023 08:42:50 -0500 Subject: [PATCH 2/4] add fix back in for REPOSITORIES_PROPERTIES --- ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 | 17 +++++++++++------ ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 | 17 +++++++++++------ ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 | 17 +++++++++++------ ga/latest/full/Dockerfile.ubuntu.ibmjava8 | 17 +++++++++++------ ga/latest/full/Dockerfile.ubuntu.openjdk11 | 17 +++++++++++------ ga/latest/full/Dockerfile.ubuntu.openjdk17 | 17 +++++++++++------ 6 files changed, 66 insertions(+), 36 deletions(-) diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 index a437bca4c..229de6c9c 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 index a28e2d432..49439d852 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 index d3a5494eb..d4b622462 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ diff --git a/ga/latest/full/Dockerfile.ubuntu.ibmjava8 b/ga/latest/full/Dockerfile.ubuntu.ibmjava8 index a437bca4c..229de6c9c 100644 --- a/ga/latest/full/Dockerfile.ubuntu.ibmjava8 +++ b/ga/latest/full/Dockerfile.ubuntu.ibmjava8 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ diff --git a/ga/latest/full/Dockerfile.ubuntu.openjdk11 b/ga/latest/full/Dockerfile.ubuntu.openjdk11 index a28e2d432..49439d852 100644 --- a/ga/latest/full/Dockerfile.ubuntu.openjdk11 +++ b/ga/latest/full/Dockerfile.ubuntu.openjdk11 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ diff --git a/ga/latest/full/Dockerfile.ubuntu.openjdk17 b/ga/latest/full/Dockerfile.ubuntu.openjdk17 index d3a5494eb..d4b622462 100644 --- a/ga/latest/full/Dockerfile.ubuntu.openjdk17 +++ b/ga/latest/full/Dockerfile.ubuntu.openjdk17 @@ -20,12 +20,17 @@ ARG VERBOSE=false ARG REPOSITORIES_PROPERTIES="" # Install the base bundle -RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \ - && echo $REPOSITORIES_PROPERTIES > /opt/ibm/wlp/etc/repositories.properties; fi \ - && installUtility install --acceptLicense baseBundle \ - && if [ ! -z $REPOSITORIES_PROPERTIES ]; then rm /opt/ibm/wlp/etc/repositories.properties; fi \ - && rm -rf /output/workarea /output/logs \ - && find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw +RUN set -eux; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + mkdir /opt/ibm/wlp/etc/; \ + echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + installUtility install --acceptLicense baseBundle; \ + if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ + rm /opt/ibm/wlp/etc/repositories.properties; \ + fi; \ + rm -rf /output/workarea /output/logs; \ + find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; COPY --chown=1001:0 server.xml /config/ From 59d9ef54a901fd791c57a662c60f4497180685f8 Mon Sep 17 00:00:00 2001 From: Michal Broz Date: Fri, 21 Jul 2023 10:36:06 -0500 Subject: [PATCH 3/4] fix 23.0.0.6 full FROMs --- ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 | 2 +- ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 | 2 +- ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 index 229de6c9c..616d74d84 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.ibmjava8 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel-java8-ibmjava +FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava USER root diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 index 49439d852..9f52f30b8 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk11 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel-java11-openj9 +FROM websphere-liberty:23.0.0.6-kernel-java11-openj9 USER root diff --git a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 index d4b622462..4d269dfdc 100644 --- a/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 +++ b/ga/23.0.0.6/full/Dockerfile.ubuntu.openjdk17 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM websphere-liberty:kernel-java17-openj9 +FROM websphere-liberty:23.0.0.6-kernel-java17-openj9 USER root From 87b8f1b06e90dbe3d12af09e5afa775e26679aad Mon Sep 17 00:00:00 2001 From: Michal Broz Date: Fri, 21 Jul 2023 15:49:15 -0500 Subject: [PATCH 4/4] install/update openssl for ubuntu images --- ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 | 2 +- ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 | 2 +- ga/latest/kernel/Dockerfile.ubuntu.openjdk11 | 2 +- ga/latest/kernel/Dockerfile.ubuntu.openjdk17 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 index 27546784c..968685e4b 100644 --- a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 +++ b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk11 @@ -72,7 +72,7 @@ RUN set -eux; \ ARG LIBERTY_URL ARG DOWNLOAD_OPTIONS="" RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget \ + && apt-get install -y --no-install-recommends unzip openssl wget \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /licenses/ \ && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ diff --git a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 index 96137b5eb..6c75686c2 100644 --- a/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 +++ b/ga/23.0.0.6/kernel/Dockerfile.ubuntu.openjdk17 @@ -72,7 +72,7 @@ RUN set -eux; \ ARG LIBERTY_URL ARG DOWNLOAD_OPTIONS="" RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget \ + && apt-get install -y --no-install-recommends unzip openssl wget \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /licenses/ \ && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 index 27546784c..968685e4b 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 @@ -72,7 +72,7 @@ RUN set -eux; \ ARG LIBERTY_URL ARG DOWNLOAD_OPTIONS="" RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget \ + && apt-get install -y --no-install-recommends unzip openssl wget \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /licenses/ \ && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 index 96137b5eb..6c75686c2 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 @@ -72,7 +72,7 @@ RUN set -eux; \ ARG LIBERTY_URL ARG DOWNLOAD_OPTIONS="" RUN apt-get update \ - && apt-get install -y --no-install-recommends unzip wget \ + && apt-get install -y --no-install-recommends unzip openssl wget \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /licenses/ \ && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \