summaryrefslogtreecommitdiffstats
path: root/mgr
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-04-09 11:32:37 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-04-09 11:32:45 +0800
commita6e0170c27511a013f9934d96c51aa551c7e1c16 (patch)
treefe14b5f216640e4e2ba6752a674a95f2d44c879e /mgr
parent266d472f0d7e6247ff2d5e87b4c483e5529b2c17 (diff)
MOdify docker file
Change-Id: I746cb47d9c7b932da695f7815b7a9253477b2027 Signed-off-by: yangyan <yangyanyj@chinamobile.com> Issue-ID: VFC-1343
Diffstat (limited to 'mgr')
-rw-r--r--mgr/docker/Dockerfile10
1 files changed, 8 insertions, 2 deletions
diff --git a/mgr/docker/Dockerfile b/mgr/docker/Dockerfile
index 16302fe..98372bf 100644
--- a/mgr/docker/Dockerfile
+++ b/mgr/docker/Dockerfile
@@ -22,7 +22,11 @@ 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 +34,14 @@ WORKDIR /service
# get binary zip from nexus - vfc-gvnfm-vnfmgr
RUN wget -q -O vfc-gvnfm-vnfmgr.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnfmgr.mgr&a=vfc-gvnfm-vnfmgr-mgr&v=LATEST&e=zip' && \
unzip vfc-gvnfm-vnfmgr.zip && \
- rm -rf vfc-gvnfm-vnfmgr.zip
+ rm -rf vfc-gvnfm-vnfmgr.zip && \
+ chown onap:onap /service -R
WORKDIR /service/vfc/gvnfm/vnfmgr/mgr
RUN pip install -r requirements.txt
EXPOSE 8803
+USER onap
WORKDIR /service
ENTRYPOINT vfc/gvnfm/vnfmgr/mgr/docker/docker-entrypoint.sh