瀏覽代碼

更新 'Dockerfile'

robert 5 年之前
父節點
當前提交
d5e53db8e1
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      Dockerfile

+ 5 - 6
Dockerfile

@@ -1,8 +1,8 @@
-#FROM centos:centos7.6.1810
-FROM centos:6.8
+FROM centos:centos7.6.1810
+#FROM centos:6.8
 LABEL author="robert_du[robert_du@easou.cn]"
 LABEL author="robert_du[robert_du@easou.cn]"
 
 
-ADD http://10.26.22.185:9000/psop/conf/dockerConfig/resin-api/gosu /usr/local/bin/gosu
+#ADD http://10.26.22.185:9000/psop/conf/dockerConfig/resin-api/gosu /usr/local/bin/gosu
 
 
 RUN yum install -y gcc python-devel unzip zip wget \
 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/f7/b6/5b98441b6749ea1db1e41e5e6e7a93cbdd7ffd45e11fe1b22d45884bc777/setuptools-42.0.2.zip \
@@ -11,8 +11,7 @@ RUN yum install -y gcc python-devel unzip zip wget \
    && cd /root/setuptools-42.0.2 && python setup.py  install \
    && cd /root/setuptools-42.0.2 && python setup.py  install \
    && cd /root/pip-19.3.1 && 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 \
-   && useradd monitor && chmod +x /usr/local/bin/gosu \
-   && gosu nobody true && mkdir -p /app/soft
+   && mkdir -p /app/soft && rm -rf /root/setuptools-42.0.2* && rm -rf /root/pip-19.3.1*
 
 
 ADD flask_zbx_tools.zip /app/soft
 ADD flask_zbx_tools.zip /app/soft
 ADD entrypoint.sh /usr/bin/entrypoint.sh
 ADD entrypoint.sh /usr/bin/entrypoint.sh
@@ -21,4 +20,4 @@ RUN unzip -d /app/soft/ /app/soft/flask_zbx_tools.zip \
    && chown -R monitor.monitor /app/soft && chmod +x /usr/bin/entrypoint.sh 
    && chown -R monitor.monitor /app/soft && chmod +x /usr/bin/entrypoint.sh 
 
 
 ENTRYPOINT ["entrypoint.sh"]
 ENTRYPOINT ["entrypoint.sh"]
-CMD ["gosu", "monitor", '/app/soft/flask_zbx_tools/start.sh']
+CMD ['/app/soft/flask_zbx_tools/start.sh']