|
@@ -2,12 +2,16 @@ FROM centos:centos7.6.1810
|
|
|
LABEL author="robert_du[robert_du@easou.cn]"
|
|
|
|
|
|
ADD flask_zbx_tools.zip /root
|
|
|
+ADD entrypoint.sh /usr/bin/entrypoint.sh
|
|
|
RUN yum install -y gcc python-devel unzip zip wget \
|
|
|
&& wget -P /root https://files.pythonhosted.org/packages/f7/b6/5b98441b6749ea1db1e41e5e6e7a93cbdd7ffd45e11fe1b22d45884bc777/setuptools-42.0.2.zip \
|
|
|
&& wget -P /root https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz \
|
|
|
&& cd /root && unzip setuptools-42.0.2.zip && tar xf pip-19.3.1.tar.gz && unzip flask_zbx_tools.zip \
|
|
|
&& cd /root/setuptools-42.0.2 && python setup.py install \
|
|
|
&& cd /root/pip-19.3.1 && python setup.py install \
|
|
|
- && cd /root && pip install flask && pip install flask-restful && pip install requests
|
|
|
-
|
|
|
+ && cd /root && pip install flask && pip install flask-restful && pip install requests \
|
|
|
+ && chmod +x /usr/bin/entrypoint.sh
|
|
|
+
|
|
|
+
|
|
|
+ENTRYPOINT ["entrypoint.sh"]
|
|
|
CMD ['/bin/sh','/root/flask_zbx_tools/start.sh']
|