-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (30 loc) · 1.82 KB
/
Dockerfile
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
43
44
45
FROM centos:7
RUN yum -y groupinstall "Development Tools" && \
yum -y install xcb-util-renderutil libxcb libxcb-devel libXrender libXrender-devel \
xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel \
xcb-util-keysyms xcb-util-keysyms-devel libxkbcommon libxkbcommon-devel \
libxkbcommon-x11 libxkbcommon-x11-devel libXext libXext-devel
ADD https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz /tmp
RUN tar -xzvf /tmp/openssl-1.1.1w.tar.gz -C /tmp
WORKDIR /tmp/openssl-1.1.1w
RUN ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl && \
make -j $(nproc) && make install && make clean && \
echo "/usr/local/ssl/lib" > /etc/ld.so.conf.d/openssl-1.1.1w.conf && ldconfig
RUN ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
RUN yum install -y gcc make patch zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel tk-devel libffi-devel xz-devel
ADD https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz /tmp
RUN tar -xzvf /tmp/Python-3.11.9.tgz -C /tmp
WORKDIR /tmp/Python-3.11.9
RUN ./configure --prefix=/usr/local/python3.11 --with-openssl=/usr/local/ssl --enable-optimizations --with-zlib --enable-shared && \
make altinstall && make clean
RUN ln -s /usr/local/python3.11/bin/python3.11 /usr/local/python3.11/bin/python3 && \
ln -s /usr/local/python3.11/bin/pip3.11 /usr/local/python3.11/bin/pip3 && \
ln -s /usr/local/python3.11/bin/python3 /usr/bin/python3 && \
ln -s /usr/local/python3.11/bin/pip3 /usr/bin/pip3
RUN echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python3.11/lib/" >> ~/.bashrc
RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python3.11/lib/ && \
pip3 install pipx && \
ln -s /usr/local/python3.11/bin/pipx /usr/bin/pipx && \
pipx install pdm && \
pipx ensurepath
WORKDIR /root