Dockerfile
From harbor.goldwind.com/library/centos:7.9.2009 ADD Python-3.10.13.tgz /data RUN yum install make xz-devel python-devel openldap-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc gcc-c++ openssl-devel xorg-x11-xauth zlib* libffi-devel -y #拷贝yum文件 COPY yum /usr/bin/yum COPY urlgrabber-ext-down /usr/libexec/urlgrabber-ext-down RUN yum install vim -y #安装openssl ADD openssl-1.1.1v.tar.gz . RUN cd openssl-1.1.1v && \ ./config --prefix=/usr/local/openssl shared zlib && \ make && make install RUN ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1 && \ ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1 #安装python WORKDIR /data/Python-3.10.13 RUN ./configure --prefix=/usr/lib/python3 --with-openssl=/usr/local/openssl && make && make install RUN rm -rf /usr/bin/{python,pip} && ln -s /usr/lib/python3/bin/python3 /usr/bin/python3 && ln -s /usr/bin/python3 /usr/bin/python && ln -s /usr/lib/python3/bin/pip3 /usr/bin/pip3 \ && ln -s /usr/bin/pip3 /usr/bin/pip #安装中文 RUN yum install kde-l10n-Chinese -y && \ yum reinstall glibc-common -y && \ localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 ENV LC_ALL zh_CN.UTF-8 #安装gunicorn wheel模块 RUN pip install -i http://nexus.goldwind.com.cn/repository/pypi-group-proxys/simple --trusted-host nexus.goldwind.com.cn -U pip && \ pip install -i http://nexus.goldwind.com.cn/repository/pypi-group-proxys/simple --trusted-host nexus.goldwind.com.cn gunicorn && \ pip install -i http://nexus.goldwind.com.cn/repository/pypi-group-proxys/simple --trusted-host nexus.goldwind.com.cn wheel && \ ln -s /usr/lib/python3/bin/gunicorn /usr/bin/gunicorn
标签:python3.10,bin,RUN,gunicorn,openssl,devel,usr,&&,镜像 From: https://www.cnblogs.com/xiaoxiaomuyuyu/p/17761108.html