diff options
author | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-08-23 15:48:11 +0300 |
---|---|---|
committer | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-08-23 15:51:03 +0300 |
commit | 08d5f508d3bc323faefdfd56451566ff724ddc2f (patch) | |
tree | 8a868c6236b26d66ed62c55cc501928bb2003076 /docker/Dockerfile.web | |
parent | e2e5f5e2c53c03630b3128796bd7db7809bd93bd (diff) |
Improve Dockerfiles to be more efficient.
Change-Id: I1739e75d94b0e3f7b4c411ded2fb911e4195da12
Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'docker/Dockerfile.web')
-rw-r--r-- | docker/Dockerfile.web | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/docker/Dockerfile.web b/docker/Dockerfile.web index 438ada6..d4b604e 100644 --- a/docker/Dockerfile.web +++ b/docker/Dockerfile.web @@ -12,31 +12,26 @@ LABEL version="v2" description="OVP nginx" ARG BRANCH=master ENV HOME /home -WORKDIR /home - -RUN apt-get update - -RUN apt-get install -y git nginx supervisor - -RUN git config --global http.sslVerify false -RUN git clone https://gerrit.opnfv.org/gerrit/dovetail-webportal - -WORKDIR /home/dovetail-webportal -RUN git checkout -f $BRANCH - -RUN mkdir -p /home/testapi - -RUN cp -rf /home/dovetail-webportal/* /home/testapi - -RUN mkdir /www -RUN cp -r /home/testapi/3rd_party/static /www/ - +WORKDIR $HOME + +# Packaged dependencies +RUN apt-get update && apt-get install -y \ + git \ + nginx \ + supervisor \ + && rm -rf /var/lib/apt/lists/* + +RUN git config --global http.sslVerify false && \ + git clone https://gerrit.opnfv.org/gerrit/dovetail-webportal $HOME/testapi && \ + cd $HOME/testapi && \ + git checkout -f $BRANCH && \ + mkdir /www && \ + cp -r $HOME/testapi/3rd_party/static /www/ ADD nginx/nginx.conf /etc/nginx/nginx.conf ADD nginx/sites-enabled/default /etc/nginx/sites-available/default ADD nginx/sites-enabled/default /etc/nginx/sites-enabled/default ADD supervisor/conf.d/nginx.conf /etc/supervisor/conf.d/nginx.conf -ADD start-nginx.sh /home/start-nginx.sh +ADD start-nginx.sh $HOME/start-nginx.sh -WORKDIR /home CMD ["bash", "start-nginx.sh"] |