diff options
author | 2019-04-09 13:18:32 +0800 | |
---|---|---|
committer | 2019-04-09 13:18:41 +0800 | |
commit | c91072ba77f54f28fb72322e224626173c4a009a (patch) | |
tree | 1408493179a1e914b9aaa71c604bd4369d11c1b1 | |
parent | 8dd7b80736e2d844488aed32d346983a9fcc872b (diff) |
Modify docker file
Change-Id: I9136f2a010e60a912fe00a6544f96acf63e4a575
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Issue-ID: VFC-1343
-rw-r--r-- | res/docker/Dockerfile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/res/docker/Dockerfile b/res/docker/Dockerfile index d81d196..6c4d1de 100644 --- a/res/docker/Dockerfile +++ b/res/docker/Dockerfile @@ -22,7 +22,12 @@ RUN apt-get update && \ apt-get install -y curl && \ apt-get install -y build-essential && \ apt-get install -y libssl-dev && \ - apt-get install -y libffi-dev + apt-get install -y libffi-dev && \ + groupadd -r onap && useradd -r -g onap onap && \ + chmod u+w /etc/sudoers && \ + sed -i '/User privilege/a\\onap ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers && \ + chmod u-x /etc/sudoers + ADD . /service WORKDIR /service @@ -30,12 +35,13 @@ WORKDIR /service # get binary zip from nexus RUN wget -q -O vfc-gvnfm-vnfres.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnfres.res&a=vfc-gvnfm-vnfres-res&v=LATEST&e=zip' && \ unzip vfc-gvnfm-vnfres.zip && \ - rm -rf vfc-gvnfm-vnfres.zip + rm -rf vfc-gvnfm-vnfres.zip && \ + chown onap:onap /service -R WORKDIR /service/vfc/gvnfm/vnfres/res RUN pip install -r requirements.txt EXPOSE 8802 - +USER onap WORKDIR /service ENTRYPOINT vfc/gvnfm/vnfres/res/docker/docker-entrypoint.sh |