diff options
author | MichaelMorris <michael.morris@est.tech> | 2020-03-15 16:59:42 +0000 |
---|---|---|
committer | MichaelMorris <michael.morris@est.tech> | 2020-03-15 16:59:51 +0000 |
commit | 70325cecbc0830d5f42c64d277273134263164fb (patch) | |
tree | 9c5713c42d7be6172c16a30279c08fcdb471f3f9 /docker/docker_be/Dockerfile | |
parent | 1f77750bca5c68b6d635dd463e4db991dcd10f01 (diff) |
Run pods as non-root user
Change-Id: Ia95d58b0dbf498c4d6295e42c1c430de6493c11b
Issue-ID: SDC-2798
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'docker/docker_be/Dockerfile')
-rw-r--r-- | docker/docker_be/Dockerfile | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/docker/docker_be/Dockerfile b/docker/docker_be/Dockerfile index c9eccf6..6821956 100644 --- a/docker/docker_be/Dockerfile +++ b/docker/docker_be/Dockerfile @@ -1,8 +1,8 @@ -FROM onap/base_sdc-jetty:1.4.1 +FROM onap/base_sdc-jetty:1.6.0 -COPY chef-solo /root/chef-solo/ +COPY --chown=jetty:jetty chef-solo ${JETTY_BASE}/chef-solo/ -COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ +COPY --chown=jetty:jetty chef-repo/cookbooks ${JETTY_BASE}/chef-solo/cookbooks/ ADD --chown=jetty:jetty target/dcae.war ${JETTY_BASE}/webapps/ @@ -10,8 +10,10 @@ USER root RUN apk add --no-cache python -COPY startup.sh /root/ +USER jetty -RUN chmod 770 /root/startup.sh +COPY --chown=jetty:jetty startup.sh ${JETTY_BASE}/ -ENTRYPOINT [ "/root/startup.sh" ] +RUN chmod 770 ${JETTY_BASE}/startup.sh + +ENTRYPOINT ${JETTY_BASE}/startup.sh |