From 5aa0dfc31e2e744198bef91a54782f054e1d80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Fri, 10 Aug 2018 08:16:36 +0200 Subject: [PATCH] fix: Set working directory back to /home/jboss Fixes #169 --- java/images.yml | 2 +- java/images/centos/Dockerfile | 3 +++ java/images/rhel/Dockerfile | 3 +++ java/templates/Dockerfile | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) 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