Skip to content

Add runtime support for writing /logs to a /serviceability directory #664

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

Open
wants to merge 5 commits into
base: vNext
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi.ibmjava8
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,12 +157,14 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi.openjdk11
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -133,6 +133,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -156,13 +158,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi.openjdk17
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi.openjdk8
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -146,6 +146,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -169,12 +171,14 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -132,6 +132,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -155,13 +157,15 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
12 changes: 8 additions & 4 deletions ga/latest/kernel/Dockerfile.ubuntu.ibmjava8
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -113,6 +113,8 @@ COPY fixes/ /opt/ibm/fixes/

# Create symlinks && set permissions for non-root user
RUN mkdir /logs \
&& chown -R 1001:0 /logs \
&& chmod -R g+rw /logs \
&& mkdir /etc/wlp \
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
&& mkdir -p /home/default \
Expand All @@ -136,12 +138,14 @@ 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 \
&& mkdir /serviceability \
&& chown -R 1001:0 /serviceability \
&& chmod -R g+rw /serviceability

# Create a new SCC layer
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
Expand Down
Loading