Skip to content

Commit 96bcde3

Browse files
authored
Create symlink /liberty/logs to point to the log directory (#664)
* Update kernel Dockerfiles for serviceability * Point LOG_DIR to user 1001 managed symlink * Fix typos * Add /serviceability folder and /liberty/logs symlink * Remove symlink perm set * Nest serviceability logs into sub directory * Add dump env exports for serviceability * Update docker-server.sh * Eval IBM env vars * Update docker-server.sh * Update docker-server.sh * Update docker-server.sh * Set serviceability folder before all execs * Add serviceability link to 25.0.0.9 * Revert 25.0.0.9 serviceability changes
1 parent 1271ce0 commit 96bcde3

13 files changed

Lines changed: 103 additions & 48 deletions

ga/latest/kernel/Dockerfile.ubi.ibmjava8

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses
117117
RUN yum -y install openssl \
118118
&& yum clean all
119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,12 +157,14 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& chown -R 1001:0 /home/default \
163-
&& chmod -R g+rw /home/default
163+
&& chmod -R g+rw /home/default \
164+
&& ln -s /logs /liberty/logs \
165+
&& mkdir /serviceability \
166+
&& chown -R 1001:0 /serviceability \
167+
&& chmod -R g+rw /serviceability
164168

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

ga/latest/kernel/Dockerfile.ubi.openjdk11

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ COPY --from=getRuntime /licenses /licenses
118118
RUN yum -y install openssl \
119119
&& yum clean all
120120
# Set Path Shortcuts
121-
ENV LOG_DIR=/logs \
121+
ENV LOG_DIR=/liberty/logs \
122122
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
123123
OPENJ9_SCC=$OPENJ9_SCC
124124

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

134134
# Create symlinks && set permissions for non-root user
135135
RUN mkdir /logs \
136+
&& chown -R 1001:0 /logs \
137+
&& chmod -R g+rw /logs \
136138
&& mkdir /etc/wlp \
137139
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
138140
&& mkdir -p /home/default \
@@ -156,13 +158,15 @@ RUN mkdir /logs \
156158
&& chmod -R g+rw /opt/ibm/wlp/usr \
157159
&& chown -R 1001:0 /opt/ibm/wlp/output \
158160
&& chmod -R g+rw /opt/ibm/wlp/output \
159-
&& chown -R 1001:0 /logs \
160-
&& chmod -R g+rw /logs \
161161
&& chown -R 1001:0 /etc/wlp \
162162
&& chmod -R g+rw /etc/wlp \
163163
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
164164
&& chown -R 1001:0 /home/default \
165-
&& chmod -R g+rw /home/default
165+
&& chmod -R g+rw /home/default \
166+
&& ln -s /logs /liberty/logs \
167+
&& mkdir /serviceability \
168+
&& chown -R 1001:0 /serviceability \
169+
&& chmod -R g+rw /serviceability
166170

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

ga/latest/kernel/Dockerfile.ubi.openjdk17

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses
117117
RUN yum -y install openssl \
118118
&& yum clean all
119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubi.openjdk8

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime /licenses /licenses
117117
RUN yum -y install openssl \
118118
&& yum clean all
119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubi9-minimal.ibmjava8

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp
131131
COPY --from=getRuntime /licenses /licenses
132132

133133
# Set Path Shortcuts
134-
ENV LOG_DIR=/logs \
134+
ENV LOG_DIR=/liberty/logs \
135135
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
136136
OPENJ9_SCC=$OPENJ9_SCC
137137

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

147147
# Create symlinks && set permissions for non-root user
148148
RUN mkdir /logs \
149+
&& chown -R 1001:0 /logs \
150+
&& chmod -R g+rw /logs \
149151
&& mkdir /etc/wlp \
150152
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
151153
&& mkdir -p /home/default \
@@ -169,12 +171,14 @@ RUN mkdir /logs \
169171
&& chmod -R g+rw /opt/ibm/wlp/usr \
170172
&& chown -R 1001:0 /opt/ibm/wlp/output \
171173
&& chmod -R g+rw /opt/ibm/wlp/output \
172-
&& chown -R 1001:0 /logs \
173-
&& chmod -R g+rw /logs \
174174
&& chown -R 1001:0 /etc/wlp \
175175
&& chmod -R g+rw /etc/wlp \
176176
&& chown -R 1001:0 /home/default \
177-
&& chmod -R g+rw /home/default
177+
&& chmod -R g+rw /home/default \
178+
&& ln -s /logs /liberty/logs \
179+
&& mkdir /serviceability \
180+
&& chown -R 1001:0 /serviceability \
181+
&& chmod -R g+rw /serviceability
178182

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

ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk11

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp
117117
COPY --from=getRuntime /licenses /licenses
118118

119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk17

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp
117117
COPY --from=getRuntime /licenses /licenses
118118

119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk21

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp
117117
COPY --from=getRuntime /licenses /licenses
118118

119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubi9-minimal.openjdk8

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp
117117
COPY --from=getRuntime /licenses /licenses
118118

119119
# Set Path Shortcuts
120-
ENV LOG_DIR=/logs \
120+
ENV LOG_DIR=/liberty/logs \
121121
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
122122
OPENJ9_SCC=$OPENJ9_SCC
123123

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

133133
# Create symlinks && set permissions for non-root user
134134
RUN mkdir /logs \
135+
&& chown -R 1001:0 /logs \
136+
&& chmod -R g+rw /logs \
135137
&& mkdir /etc/wlp \
136138
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
137139
&& mkdir -p /home/default \
@@ -155,13 +157,15 @@ RUN mkdir /logs \
155157
&& chmod -R g+rw /opt/ibm/wlp/usr \
156158
&& chown -R 1001:0 /opt/ibm/wlp/output \
157159
&& chmod -R g+rw /opt/ibm/wlp/output \
158-
&& chown -R 1001:0 /logs \
159-
&& chmod -R g+rw /logs \
160160
&& chown -R 1001:0 /etc/wlp \
161161
&& chmod -R g+rw /etc/wlp \
162162
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
163163
&& chown -R 1001:0 /home/default \
164-
&& chmod -R g+rw /home/default
164+
&& chmod -R g+rw /home/default \
165+
&& ln -s /logs /liberty/logs \
166+
&& mkdir /serviceability \
167+
&& chown -R 1001:0 /serviceability \
168+
&& chmod -R g+rw /serviceability
165169

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

ga/latest/kernel/Dockerfile.ubuntu.ibmjava8

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ RUN apt-get update \
9898
&& rm -rf /var/lib/apt/lists/*
9999

100100
# Set Path Shortcuts
101-
ENV LOG_DIR=/logs \
101+
ENV LOG_DIR=/liberty/logs \
102102
WLP_OUTPUT_DIR=/opt/ibm/wlp/output \
103103
OPENJ9_SCC=$OPENJ9_SCC
104104

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

114114
# Create symlinks && set permissions for non-root user
115115
RUN mkdir /logs \
116+
&& chown -R 1001:0 /logs \
117+
&& chmod -R g+rw /logs \
116118
&& mkdir /etc/wlp \
117119
&& mkdir -p /opt/ibm/wlp/usr/shared/resources/lib.index.cache \
118120
&& mkdir -p /home/default \
@@ -136,12 +138,14 @@ RUN mkdir /logs \
136138
&& chmod -R g+rw /opt/ibm/wlp/usr \
137139
&& chown -R 1001:0 /opt/ibm/wlp/output \
138140
&& chmod -R g+rw /opt/ibm/wlp/output \
139-
&& chown -R 1001:0 /logs \
140-
&& chmod -R g+rw /logs \
141141
&& chown -R 1001:0 /etc/wlp \
142142
&& chmod -R g+rw /etc/wlp \
143143
&& chown -R 1001:0 /home/default \
144-
&& chmod -R g+rw /home/default
144+
&& chmod -R g+rw /home/default \
145+
&& ln -s /logs /liberty/logs \
146+
&& mkdir /serviceability \
147+
&& chown -R 1001:0 /serviceability \
148+
&& chmod -R g+rw /serviceability
145149

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

0 commit comments

Comments
 (0)