codecentric / springboot-maven3-centos

S2I builder image for building and running maven based Spring Boot applications
https://hub.docker.com/r/codecentric/springboot-maven3-centos/
Apache License 2.0
30 stars 67 forks source link

Fix bc fail issue, source code not keep same location in Dockerfile and s2i assemble script #11

Closed fanfanbj closed 6 years ago

fanfanbj commented 6 years ago

source code in Dockerfile will change owner to USER 1001. and location is /opt/app-root directory. and in s2i/assemble script, source code will be installed in ./ directory.

echo "---> Installing application source" cp -Rf /tmp/src/. ./

we need to keep the same location in Dockerfile and assemble script, otherwise, openshift build will fail with permission deny error.

I made this fix. to change Dockerfile as below: RUN chown -R 1001:0 ./

britter commented 6 years ago

Thank you!