summaryrefslogtreecommitdiffstats
path: root/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2020-03-10 12:37:48 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-03-16 08:45:20 +0000
commita2abf6ea18d512d367277bacaf7476754dc0eff5 (patch)
tree595dbda50b67c33936b754b0930416e892ff3ea2 /openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile
parent1dcbd56c897602f15f6659e113fd4c8011227fc2 (diff)
Run pods as non-root user
Summary of changes: sdc-cassandra-init Added user sdc (in base image base_sdc-cqlsh - https://gerrit.onap.org/r/103436) Run entrypoint as user sdc Moved relevant files from /root/ to /home/sdc/ sdc-backend-init Added user sdc (in base image base_sdc-python - https://gerrit.onap.org/r/103436) Run entrypoint as user sdc Moved relevant files from /root/ to /home/sdc/ sdc-backend Run entrypoint as user jetty Moved relevant files from /root/ to /var/lib/jetty/ Moved cadi & cert files from /opt/app/jetty to /var/lib/jetty/ Moved ready_probe from /var/lib/read-probe.sh to /var/lib/jetty/read-probe.sh sdc-frontend Run entrypoint as user jetty Moved relevant files from /root/ to /var/lib/jetty/ Moved ready_probe from /var/lib/read-probe.sh to /var/lib/jetty/read-probe.sh sdc-onboard-backend-docker Run entrypoint as user jetty Moved relevant files from /root/ to /var/lib/jetty/ Moved ready_probe from /var/lib/read-probe.sh to /var/lib/jetty/read-probe.sh sdc-onboard-db-init-docker Run entrypoint as user sdc Added user sdc (in base image base_sdc-cqlsh - https://gerrit.onap.org/r/103436) Moved relevant files from /root/ to /home/sdc/ Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-2798 Change-Id: I85be320a4a5e1cc5aeebbb98c4484d5d6fd06dfc
Diffstat (limited to 'openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile')
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile12
1 files changed, 5 insertions, 7 deletions
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile
index e6a0dc1ec2..acc84ab393 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/Dockerfile
@@ -1,17 +1,15 @@
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 onboarding-be-*.war ${JETTY_BASE}/webapps/
ADD --chown=jetty:jetty api-docs.war ${JETTY_BASE}/webapps/
-USER root
+COPY --chown=jetty:jetty startup.sh ${JETTY_BASE}/
-COPY startup.sh /root/
+RUN chmod 770 ${JETTY_BASE}/startup.sh
-RUN chmod 770 /root/startup.sh
-
-ENTRYPOINT [ "/root/startup.sh" ]
+ENTRYPOINT ${JETTY_BASE}/startup.sh