diff options
author | Chris Donley <christopher.donley@huawei.com> | 2018-03-16 14:16:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-16 14:16:45 +0000 |
commit | 1c473e186f58b2211e4658a472fc7dced7ec2f64 (patch) | |
tree | ac1ca80e07e1bf2bdffb79d26c37931348dd297a /docker/src/main/docker/Dockerfile | |
parent | 2fab7d685ff579f1fa00013fe268a9a2bed03e5f (diff) | |
parent | b071b23b024a07b5e0d9f1c915468384369e26af (diff) |
Merge "Dockerize rest API for ICE tests"
Diffstat (limited to 'docker/src/main/docker/Dockerfile')
-rw-r--r-- | docker/src/main/docker/Dockerfile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docker/src/main/docker/Dockerfile b/docker/src/main/docker/Dockerfile new file mode 100644 index 0000000..7b3f033 --- /dev/null +++ b/docker/src/main/docker/Dockerfile @@ -0,0 +1,29 @@ +FROM python:3.6.1 + +ENV ICE_SETTINGS /opt/ice/ice-server/heat_test/prod_settings.cfg +ENV DEBUG False +ENV MSB_ADDR "127.0.0.1" +ENV MSB_PORT 80 + +# add application +COPY maven/ /opt/ice +COPY prod_settings.cfg /opt/ice/ice-server/heat_test/ +COPY run.sh /opt/ice/ice-server/heat_test/ + +EXPOSE 5000 + +# install requirements +# Create the group and user to be used in this container +RUN pip install -r /opt/ice/ice-server/requirements.txt &&\ + pip install -r /opt/ice/validation-scripts/requirements.txt &&\ + pip install dumb-init &&\ + groupadd flaskgroup && useradd -m -g flaskgroup -s /bin/bash flask &&\ + chown -R flask:flaskgroup /opt/ice &&\ + chmod +x /opt/ice/ice-server/heat_test/*.sh + +USER flask +WORKDIR /opt/ice/ice-server/heat_test +# use dumb-init to translate SIGTERM to SIGINT +# this is needed to gracefully stop flask (and unregister service properly) +ENTRYPOINT ["dumb-init", "--rewrite", "15:2", "--"] +CMD ["./run.sh"] |