Update Dockerfile

This commit is contained in:
luoyi21a 2024-07-15 07:51:43 +08:00
parent 5fdf341d33
commit cda0eb7090
1 changed files with 11 additions and 3 deletions

View File

@ -1,14 +1,22 @@
FROM centos:7
FROM quay.io/centos/centos:7
RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
RUN yum update -y && \
yum install -y wget gcc make openssl-devel bzip2-devel libffi-devel zlib-devel
RUN wget -P /data/ob-tool https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
RUN wget -P /data/ob-tool https://mirrors.huaweicloud.com/python/3.9.6/Python-3.9.6.tgz
RUN cd /data/ob-tool && tar xzf Python-3.9.6.tgz
RUN cd /data/ob-tool/Python-3.9.6 && ./configure --enable-optimizations && make altinstall
RUN mkdir ~/.pip \
&& echo "[global]" > ~/.pip/pip.conf \
&& echo "index-url = https://mirrors.huaweicloud.com/repository/pypi/simple/" >> ~/.pip/pip.conf \
&& echo "[install]" >> ~/.pip/pip.conf \
&& echo "trusted-host = mirrors.huaweicloud.com" >> ~/.pip/pip.conf
ADD ./ /data/ob-robot/
RUN cd /data/ob-robot/ && \
pip3.9 install -r /data/ob-robot/requirement.txt
pip3.9 install -r /data/ob-robot/requirement.txt
RUN yum install -y git openssh-server