summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-04-09 10:42:20 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-04-09 10:42:36 +0800
commit676eb3ad8ec4e406d31f487e0c0ea264a0d5fa3d (patch)
treefb5451df662ce2bedc33f41e0d33dcbd01d670b7 /lcm
parent9a3a1a15920b8d3497f95198ca06d57d5b14a6a9 (diff)
Modify docker file
Change-Id: I378e68d987854e182a940ed1cdd1ffe56ee80f5f Signed-off-by: yangyan <yangyanyj@chinamobile.com> Issue-ID: VFC-1343
Diffstat (limited to 'lcm')
-rwxr-xr-xlcm/docker/Dockerfile12
1 files changed, 9 insertions, 3 deletions
diff --git a/lcm/docker/Dockerfile b/lcm/docker/Dockerfile
index cf1e0844..12899899 100755
--- a/lcm/docker/Dockerfile
+++ b/lcm/docker/Dockerfile
@@ -6,6 +6,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+
RUN sed -i "s|set compatible|set nocompatible|" /etc/vim/vimrc.tiny
RUN echo "set backspace=2" >> /etc/vim/vimrc.tiny
@@ -22,7 +23,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 +35,13 @@ WORKDIR /service
# get binary zip from nexus
RUN wget -q -O vfc-gvnfm-vnflcm-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnflcm.lcm&a=vfc-gvnfm-vnflcm-lcm&v=LATEST&e=zip' && \
unzip vfc-gvnfm-vnflcm-lcm.zip && \
- rm -rf vfc-gvnfm-vnflcm-lcm.zip
+ rm -rf vfc-gvnfm-vnflcm-lcm.zip && \
+ chown onap:onap /service -R
WORKDIR /service/vfc/gvnfm/vnflcm/lcm
RUN pip install -r requirements.txt
EXPOSE 8801
-
+USER onap
WORKDIR /service
ENTRYPOINT vfc/gvnfm/vnflcm/lcm/docker/docker-entrypoint.sh