-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathfeapder_dockerfile
More file actions
42 lines (37 loc) · 1.53 KB
/
feapder_dockerfile
File metadata and controls
42 lines (37 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM registry.cn-hangzhou.aliyuncs.com/feapderd/feapder:2.5
# 安装自定义的openssl版本,1.1.1
RUN set -ex \
&& wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz --no-check-certificate \
&& tar -zxvf openssl-1.1.1g.tar.gz \
&& cd openssl-1.1.1g \
&& ./config --prefix=/usr/local/openssl-1.1.1 --openssldir=/usr/local/openssl-1.1.1 no-ssl2 \
&& make \
&& make install \
&& make clean \
&& rm -rf /openssl-1.1.1*
# 安装自定义的python版本,3.10.8
RUN set -ex \
&& wget https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz \
&& tar -zxvf Python-3.10.8.tgz \
&& cd Python-3.10.8 \
&& ./configure --prefix=/usr/local/python-3.10.8 --with-openssl=/usr/local/openssl-1.1.1 --with-openssl-rpath=auto \
&& make \
&& make install \
&& make clean \
&& rm -rf /Python-3.10.8* \
&& ln -s /usr/local/python-3.10.8/bin/python3 /usr/bin/python3.10.8 \
&& ln -s /usr/local/python-3.10.8/bin/pip3 /usr/bin/pip3.10.8
# 删除之前的默认python版本
RUN set -ex \
&& rm -rf /usr/bin/python3 \
&& rm -rf /usr/bin/pip3 \
&& rm -rf /usr/bin/python \
&& rm -rf /usr/bin/pip
# 设置默认为python3.10.8
RUN set -ex \
&& ln -s /usr/local/python-3.10.8/bin/python3 /usr/bin/python \
&& ln -s /usr/local/python-3.10.8/bin/python3 /usr/bin/python3 \
&& ln -s /usr/local/python-3.10.8/bin/pip3 /usr/bin/pip \
&& ln -s /usr/local/python-3.10.8/bin/pip3 /usr/bin/pip3
# 将python3.10.8加入到环境变量
ENV PATH=$PATH:/usr/local/python-3.10.8/bin/