diff options
author | 2020-02-26 14:38:57 -0800 | |
---|---|---|
committer | 2020-02-26 23:28:52 +0000 | |
commit | 29fccc362781087559262a16d87ab7e2ae9f7f46 (patch) | |
tree | ca04c38e1c9851082e6c50fc0325544b76e9668e /cdt/src/main/docker/Dockerfile | |
parent | 4ea528fa8a0456c0973982687f43473acef0dbde (diff) |
Run cdt nodejs as non-root user
Modify the dockerfile so that the nodejs process
that hosts cdt runs as a non-root user.
Change-Id: If64cb915c626897f8815acc3a2007f54adc0e03b
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1837
Diffstat (limited to 'cdt/src/main/docker/Dockerfile')
-rw-r--r-- | cdt/src/main/docker/Dockerfile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cdt/src/main/docker/Dockerfile b/cdt/src/main/docker/Dockerfile index 26efda4..a826052 100644 --- a/cdt/src/main/docker/Dockerfile +++ b/cdt/src/main/docker/Dockerfile @@ -23,8 +23,11 @@ FROM node:10.15.3-alpine MAINTAINER APP-C Team (appc@lists.openecomp.org) -COPY config-design-tool /opt/cdt -COPY startCdt.sh /opt/startCdt.sh -COPY cert /opt/cert -RUN mkdir /opt/cdt/logs +USER root +COPY --chown=node:node config-design-tool /opt/cdt +COPY --chown=node:node startCdt.sh /opt/startCdt.sh +COPY --chown=node:node cert /opt/cert RUN npm install express --save +USER node +RUN mkdir /opt/cdt/logs + |