diff --git a/java/images.yml b/java/images.yml index 8891c3d3..73219183 100644 --- a/java/images.yml +++ b/java/images.yml @@ -3,7 +3,7 @@ fish-pepper: params: - base name: "fabric8/s2i-java" - build: "2.3.0" + build: "2.3.1" config: base: diff --git a/java/images/centos/Dockerfile b/java/images/centos/Dockerfile index 7bfdce07..5e338dc9 100644 --- a/java/images/centos/Dockerfile +++ b/java/images/centos/Dockerfile @@ -107,6 +107,9 @@ RUN mkdir -p /deployments/data \ && chown -R jboss:root /opt/jboss \ && chmod 664 /etc/passwd +# S2I scripts rely on /opt/jboss as working directory +WORKDIR /opt/jboss + # S2I requires a numeric, non-0 UID. This is the UID for the jboss user in the base image USER 1000 diff --git a/java/images/rhel/Dockerfile b/java/images/rhel/Dockerfile index cacdb2c0..568181dd 100644 --- a/java/images/rhel/Dockerfile +++ b/java/images/rhel/Dockerfile @@ -96,6 +96,9 @@ RUN mkdir -p /deployments/data \ && chown -R jboss:root /home/jboss \ && chmod 664 /etc/passwd +# S2I scripts rely on /home/jboss as working directory +WORKDIR /home/jboss + # S2I requires a numeric, non-0 UID. This is the UID for the jboss user in the base image USER 185 diff --git a/java/templates/Dockerfile b/java/templates/Dockerfile index c2ca4f87..c274ddf8 100644 --- a/java/templates/Dockerfile +++ b/java/templates/Dockerfile @@ -98,6 +98,9 @@ RUN mkdir -p /deployments/data \ && chown -R jboss:root {{= fp.config.base.home }} \ && chmod 664 /etc/passwd +# S2I scripts rely on {{= fp.config.base.home }} as working directory +WORKDIR {{= fp.config.base.home }} + # S2I requires a numeric, non-0 UID. This is the UID for the jboss user in the base image {{? fp.param.base === "rhel"}} USER 185