Fix OpenShift permissions issues for WF 8 & 9.
MODIFY
on-wildfly8/Dockerfile
on-wildfly8/Dockerfile
@@ -8,5 +8,12 @@ ENV APIMAN_VERSION 1.3.0.Final
RUN cd $HOME/wildfly \
&& curl http://downloads.jboss.org/apiman/$APIMAN_VERSION/apiman-distro-wildfly8-$APIMAN_VERSION-overlay.zip | bsdtar -xvf-
+USER root
+
+RUN chown -R jboss:0 ${JBOSS_HOME} \
+ && chmod -R g+rw ${JBOSS_HOME}
+
+USER jboss
+
# Set the default command to run on boot
ENTRYPOINT ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-c", "standalone-apiman.xml"]

MODIFY
on-wildfly9/Dockerfile
on-wildfly9/Dockerfile
@@ -8,5 +8,12 @@ ENV APIMAN_VERSION 1.3.0.Final
RUN cd $HOME/wildfly \
&& curl http://downloads.jboss.org/apiman/$APIMAN_VERSION/apiman-distro-wildfly9-$APIMAN_VERSION-overlay.zip | bsdtar -xvf-
+USER root
+
+RUN chown -R jboss:0 ${JBOSS_HOME} \
+ && chmod -R g+rw ${JBOSS_HOME}
+
+USER jboss
+
# Set the default command to run on boot
ENTRYPOINT ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-c", "standalone-apiman.xml"]

Fix OpenShift permissions issues for WF 8 & 9.