From 6570c8f2d8955d18be34831bbe25286e11a255af Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 27 Feb 2019 08:49:09 -0500 Subject: 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) Former-commit-id: 6f2311e494d2fa1ff8635134bf5325a3ced4881e --- installation/sdnc/src/main/docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile index 7f7c0dea..df392101 100755 --- a/installation/sdnc/src/main/docker/Dockerfile +++ b/installation/sdnc/src/main/docker/Dockerfile @@ -13,6 +13,8 @@ ENV JAVA_SECURITY_DIR $SSL_CERTS_DIR/java 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 cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.kara 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 -- cgit 1.2.3-korg