Run ODL container as non-root user
Update sdnc ODL container to run as non-root user 'odl'
Change-Id: If23e061fe861eca9155874fe2462b20ca7219382
Issue-ID: SDNC-668
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Former-commit-id: 6f2311e494d2fa1ff8635134bf5325a3ced4881e
diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile
index 7f7c0de..df39210 100755
--- a/installation/sdnc/src/main/docker/Dockerfile
+++ b/installation/sdnc/src/main/docker/Dockerfile
@@ -13,6 +13,8 @@
ENV SDNC_NORTHBOUND_REPO mvn:org.onap.sdnc.northbound/sdnc-northbound-all/${sdnc.northbound.version}/xml/features
+USER root
+
# imstall ssl and java certificates
COPY AAF_RootCA.cer $SSL_CERTS_DIR
@@ -35,6 +37,8 @@
RUN sed -i -e "\|featuresRepositories|s|$|,${SDNC_NORTHBOUND_REPO}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,sdnc-northbound-all|" $ODL_HOME/etc/org.apache.karaf.features.cfg
+RUN chown -R odl /opt
+USER odl
ENTRYPOINT /opt/onap/sdnc/bin/startODL.sh
EXPOSE 8181