diff --git a/ga/latest/kernel/Dockerfile.ubi.ibmjava8 b/ga/latest/kernel/Dockerfile.ubi.ibmjava8 index 8d41f509..f6aa68cc 100644 --- a/ga/latest/kernel/Dockerfile.ubi.ibmjava8 +++ b/ga/latest/kernel/Dockerfile.ubi.ibmjava8 @@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses RUN yum -y install openssl \ && yum clean all # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -155,12 +155,12 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi.openjdk11 b/ga/latest/kernel/Dockerfile.ubi.openjdk11 index cbae7985..74818405 100644 --- a/ga/latest/kernel/Dockerfile.ubi.openjdk11 +++ b/ga/latest/kernel/Dockerfile.ubi.openjdk11 @@ -118,7 +118,7 @@ COPY --from=getRuntime /licenses /licenses RUN yum -y install openssl \ && yum clean all # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -156,13 +156,13 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi.openjdk17 b/ga/latest/kernel/Dockerfile.ubi.openjdk17 index c08c884b..7d61bf55 100644 --- a/ga/latest/kernel/Dockerfile.ubi.openjdk17 +++ b/ga/latest/kernel/Dockerfile.ubi.openjdk17 @@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses RUN yum -y install openssl \ && yum clean all # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -155,13 +155,13 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi.openjdk8 b/ga/latest/kernel/Dockerfile.ubi.openjdk8 index b9488080..920c0e5d 100644 --- a/ga/latest/kernel/Dockerfile.ubi.openjdk8 +++ b/ga/latest/kernel/Dockerfile.ubi.openjdk8 @@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses RUN yum -y install openssl \ && yum clean all # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -155,13 +155,13 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8 b/ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8 index 2426570b..b71dfdd0 100644 --- a/ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8 +++ b/ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8 @@ -131,7 +131,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp COPY --from=getRuntime /licenses /licenses # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -174,7 +174,9 @@ RUN mkdir /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11 b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11 index 26511988..6dbeb72c 100644 --- a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11 +++ b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11 @@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp COPY --from=getRuntime /licenses /licenses # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -161,7 +161,9 @@ RUN mkdir /logs \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17 b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17 index f02644e1..3797c2d3 100644 --- a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17 +++ b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17 @@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp COPY --from=getRuntime /licenses /licenses # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -161,7 +161,9 @@ RUN mkdir /logs \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21 b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21 index a7ffb504..5d7f4d11 100644 --- a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21 +++ b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21 @@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp COPY --from=getRuntime /licenses /licenses # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -155,13 +155,13 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8 b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8 index 3beb43d2..8c4210b7 100644 --- a/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8 +++ b/ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8 @@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp COPY --from=getRuntime /licenses /licenses # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -161,7 +161,9 @@ RUN mkdir /logs \ && chmod -R g+rw /etc/wlp \ && if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 b/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 index 761294d0..d8e1c218 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 +++ b/ga/latest/kernel/Dockerfile.ubuntu.ibmjava8 @@ -98,7 +98,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -136,12 +136,12 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 index ea5cb763..9b23444d 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk11 @@ -93,7 +93,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -131,12 +131,12 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 index fc16031f..12d45640 100644 --- a/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 +++ b/ga/latest/kernel/Dockerfile.ubuntu.openjdk17 @@ -93,7 +93,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Set Path Shortcuts -ENV LOG_DIR=/logs \ +ENV LOG_DIR=/liberty/logs \ WLP_OUTPUT_DIR=/opt/ibm/wlp/output \ OPENJ9_SCC=$OPENJ9_SCC @@ -131,12 +131,12 @@ RUN mkdir /logs \ && chmod -R g+rw /opt/ibm/wlp/usr \ && chown -R 1001:0 /opt/ibm/wlp/output \ && chmod -R g+rw /opt/ibm/wlp/output \ - && chown -R 1001:0 /logs \ - && chmod -R g+rw /logs \ && chown -R 1001:0 /etc/wlp \ && chmod -R g+rw /etc/wlp \ && chown -R 1001:0 /home/default \ - && chmod -R g+rw /home/default + && chmod -R g+rw /home/default \ + && ln -s /logs /liberty/logs \ + && chown -h 1001:0 /liberty/logs # Create a new SCC layer RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ diff --git a/ga/latest/kernel/helpers/runtime/docker-server.sh b/ga/latest/kernel/helpers/runtime/docker-server.sh index 8df65ef7..ade1aed3 100755 --- a/ga/latest/kernel/helpers/runtime/docker-server.sh +++ b/ga/latest/kernel/helpers/runtime/docker-server.sh @@ -154,6 +154,12 @@ elif [[ ! -z "$WLP_CHECKPOINT" ]]; then # A checkpoint action has been requested; run the checkpoint.sh script. checkpoint.sh "$TMP_CHECKPOINT" else + if [[ ! -z "$SERVICEABILITY_NAMESPACE" ]] && [[ ! -z $HOSTNAME ]]; then + SERVICEABILITY_FOLDER="/serviceability/$SERVICEABILITY_NAMESPACE/$HOSTNAME" + mkdir -p $SERVICEABILITY_FOLDER + rm /liberty/logs + ln -s $SERVICEABILITY_FOLDER /liberty/logs + fi # The default is to just exec the supplied CMD exec "$@" fi