diff options
author | 2020-04-08 15:15:20 +0000 | |
---|---|---|
committer | 2020-04-08 15:15:20 +0000 | |
commit | b58583905c6e7ec8f9d08403b4e42f59a61ea23c (patch) | |
tree | f458c98c35177226a9cf4792c13ad9168adac62c /installation/ueb-listener | |
parent | 25db5556859fa272430be9ab839d3cf27b9dad74 (diff) | |
parent | 8ec995121b60870819f523c0cd6b42368e3175ee (diff) |
Merge "Start as non-root"
Former-commit-id: e2ea89f2e3fdcd7f5b41fef1d0703495a619e277
Diffstat (limited to 'installation/ueb-listener')
-rw-r--r-- | installation/ueb-listener/src/main/docker/Dockerfile | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/installation/ueb-listener/src/main/docker/Dockerfile b/installation/ueb-listener/src/main/docker/Dockerfile index 8008dfd9..daecd1cc 100644 --- a/installation/ueb-listener/src/main/docker/Dockerfile +++ b/installation/ueb-listener/src/main/docker/Dockerfile @@ -1,6 +1,6 @@ # Base alpine with added packages needed for open ecomp -FROM onap/ccsdk-alpine-image:${ccsdk.docker.version} -MAINTAINER SDNC Team (onap-sdnc@lists.onap.org) +FROM onap/ccsdk-alpine-image:${ccsdk.docker.version} AS stage0 + ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV SDNC_CONFIG_DIR /opt/onap/sdnc/data/properties @@ -8,4 +8,21 @@ ENV SDNC_CONFIG_DIR /opt/onap/sdnc/data/properties # copy deliverables to opt COPY opt /opt +# End of stage0 + +FROM onap/ccsdk-alpine-image:${ccsdk.docker.version} +MAINTAINER SDNC Team (onap-sdnc@lists.onap.org) + +ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk +ENV SDNC_CONFIG_DIR /opt/onap/sdnc/data/properties + +USER root + + +# Create sdnc user +RUN addgroup -S sdnc && adduser -S sdnc -G sdnc + +# Copy /opt and change user/owner to sdnc +COPY --from=stage0 --chown=sdnc:sdnc /opt /opt +USER sdnc
\ No newline at end of file |