summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2019-06-27 04:37:55 -0400
committerDan Xu <xudan16@huawei.com>2019-07-10 03:09:06 +0000
commit1f36d6247578273197a4ba64b58b02b1ed837171 (patch)
treea8049bb2a3523c678ff16741cf754993fd8e9fd5 /docker/Dockerfile
parent1aafeb7eeef0a870d0c4cef95c929b66fd8ad991 (diff)
Add Swagger UI for dovetail API
Change-Id: If8f515b02f0372955739dd580967a3198930e98b Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile12
1 files changed, 11 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 077f5e34..56ca1ea2 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -12,11 +12,13 @@ MAINTAINER Stamatis Katsaounis <mokats@intracom-telecom.com>
LABEL version="0.1" description="OPNFV Dovetail Docker Container"
ARG BRANCH=master
+ARG SWAGGER_UI_TAG=v3.22.3
RUN \
apt-get update \
&& \
apt-get install -y \
+ apache2 \
gcc \
make \
git \
@@ -50,8 +52,16 @@ RUN \
&& \
ln -s /usr/local/lib/python2.7/dist-packages/dovetail ${REPOS_DIR}/dovetail
+RUN \
+ git clone https://github.com/swagger-api/swagger-ui.git \
+&& \
+ cd swagger-ui && git checkout $SWAGGER_UI_TAG
+
WORKDIR ${REPOS_DIR}/dovetail
ENV FLASK_APP ${API_DIR}/app/routes.py
+# This port is for flask API in container
EXPOSE 5000
-CMD ${API_DIR}/boot.sh
+# This port is for Swagger UI in container
+EXPOSE 80
+CMD bash ${API_DIR}/boot.sh