summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-04-09 13:18:32 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-04-09 13:18:41 +0800
commitc91072ba77f54f28fb72322e224626173c4a009a (patch)
tree1408493179a1e914b9aaa71c604bd4369d11c1b1 /res
parent8dd7b80736e2d844488aed32d346983a9fcc872b (diff)
Modify docker file
Change-Id: I9136f2a010e60a912fe00a6544f96acf63e4a575 Signed-off-by: yangyan <yangyanyj@chinamobile.com> Issue-ID: VFC-1343
Diffstat (limited to 'res')
-rw-r--r--res/docker/Dockerfile12
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