diff options
author | yunlong ying <ying.yunlong@zte.com.cn> | 2019-04-09 03:19:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-09 03:19:49 +0000 |
commit | 41275b60f7a38d0bb20df57f4e34386e7783630d (patch) | |
tree | 40a8d737388479f64a357ab72ce6c5a5966c88eb | |
parent | d12c538730fdbf4d27f96228b3fc8129b026b399 (diff) | |
parent | 676eb3ad8ec4e406d31f487e0c0ea264a0d5fa3d (diff) |
Merge "Modify docker file"
-rwxr-xr-x | lcm/docker/Dockerfile | 12 |
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 |