Skip to content

Commit 6d3e037

Browse files
author
杨祎杰
committed
fix python3.10.8 branch “ModuleNotFoundError: No module named '_ssl'” bug
1 parent f2f7989 commit 6d3e037

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎feapder_dockerfile‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
FROM registry.cn-hangzhou.aliyuncs.com/feapderd/feapder:2.4
22

3+
# 安装依赖
4+
RUN yum update -y && yum install -y openssl openssl-devel
5+
6+
# 安装自定义的openssl版本,1.1.1
7+
RUN set -ex \
8+
&& wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz \
9+
&& wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz.sha256 \
10+
# && sha256sum openssl-1.1.1g.tar.gz \
11+
&& tar -zxvf openssl-1.1.1g.tar.gz \
12+
&& cd openssl-1.1.1g \
13+
&& ./config --prefix=/usr/local/openssl-1.1.1 --openssldir=/usr/local/openssl-1.1.1 no-ssl2 \
14+
&& make \
15+
&& make install \
16+
&& make clean \
17+
&& rm -rf /openssl-1.1.1*
18+
319
# 安装自定义的python版本,3.10.8
420
RUN set -ex \
521
&& wget https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz \
622
&& tar -zxvf Python-3.10.8.tgz \
723
&& cd Python-3.10.8 \
8-
&& ./configure prefix=/usr/local/python-3.10.8 \
24+
&& ./configure --prefix=/usr/local/python-3.10.8 --with-openssl=/usr/local/openssl-1.1.1 --with-openssl-rpath=auto \
925
&& make \
1026
&& make install \
1127
&& make clean \

0 commit comments

Comments
 (0)