File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
run/artifacts/opt/jboss/container/java/run Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,11 @@ get_exec_args() {
220
220
# Ensure that the running UID has the "jboss" passwd metadata
221
221
# XXX: Maybe we should make this an entrypoint for the image?
222
222
function configure_passwd() {
223
- sed " /^jboss/s/[^:]*/$( id -u) /3" /etc/passwd > " $HOME /passwd"
223
+ # OPENJDK-533: this file is only writeable if the image uses the
224
+ # nss_wrapper module. ubi8/openjdk-17 does not.
225
+ if [ -w " $HOME /passwd" ]; then
226
+ sed " /^jboss/s/[^:]*/$( id -u) /3" /etc/passwd > " $HOME /passwd"
227
+ fi
224
228
}
225
229
226
230
# Start JVM
Original file line number Diff line number Diff line change 6
6
# This ID is registered static ID for the JBoss EAP product
7
7
# on RHEL which makes it safe to use.
8
8
groupadd -r jboss -g 185 && useradd -u 185 -r -g root -G jboss -m -d /home/jboss -s /sbin/nologin -c " JBoss user" jboss
9
+
10
+ # OPENJDK-533: Some container runtimes (Docker) will fail to start if
11
+ # the running UID cannot chdir to $HOME
12
+ chmod og+x /home/jboss
You can’t perform that action at this time.
0 commit comments