@@ -16,14 +16,14 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
16
16
graphviz \
17
17
libc++-dev \
18
18
libc++abi-dev \
19
+ libffi-dev \
19
20
libglu1-mesa-dev \
20
21
libqt5opengl5 \
21
22
libqt5opengl5-dev \
22
23
libqt5svg5-dev \
23
24
libqt5sql5-sqlite \
24
25
make \
25
26
openssl \
26
- python \
27
27
qt5-default \
28
28
qtdeclarative5-dev \
29
29
qtdeclarative5-qtquick2-plugin \
@@ -35,14 +35,43 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
35
35
zlib1g-dev \
36
36
&& rm -rf /var/lib/apt/lists/*
37
37
38
- # Install PIP (the version from APT is not sufficient)
39
- RUN curl "https://bootstrap.pypa.io/2.7/get-pip.py" -o get-pip.py \
40
- && python get-pip.py
38
+ # Remove DST root certificate since it is not compatible with OpenSSL 1.0. This
39
+ # is only needed for building the Docker image, afterwards we will have a newer
40
+ # OpenSSL library.
41
+ # See https://medium.com/geekculture/will-you-be-impacted-by-letsencrypt-dst-root-ca-x3-expiration-d54a018df257
42
+ RUN sed -i 's/mozilla\/ DST_Root_CA_X3.crt/!mozilla\/ DST_Root_CA_X3.crt/g' \
43
+ /etc/ca-certificates.conf && update-ca-certificates
41
44
42
- # Install Python packages
43
- RUN pip install \
44
- "future==0.17.1" \
45
- "flake8==3.7.7"
45
+ # Install OpenSSL 1.1 for Python/pip.
46
+ ARG OPENSSL_VERSION="1.1.1l"
47
+ RUN wget -c "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -O /tmp.tar.gz \
48
+ && tar -zxf /tmp.tar.gz \
49
+ && cd "./openssl-$OPENSSL_VERSION" \
50
+ && ./config --prefix=/usr --openssldir=/etc/ssl '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)' \
51
+ && make -s -j8 \
52
+ && make install > /dev/null \
53
+ && cd .. \
54
+ && rm -rf "./openssl-$OPENSSL_VERSION" \
55
+ && rm /tmp.tar.gz
56
+
57
+ # Install Python & pip
58
+ # Note: Actually Python 3.5 from the official Ubuntu repositories is
59
+ # sufficient for us, but having a more recent version simplifies dependency
60
+ # management since then we can drop support for Python 3.5.
61
+ ARG PYTHON_VERSION="3.10.0"
62
+ RUN wget "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" \
63
+ && tar xzvf "./Python-$PYTHON_VERSION.tgz" \
64
+ && cd "./Python-$PYTHON_VERSION" \
65
+ && ./configure \
66
+ && make -j8 \
67
+ && make install \
68
+ && cd .. \
69
+ && rm -rf "./Python-$PYTHON_VERSION" \
70
+ && rm "./Python-$PYTHON_VERSION.tgz" \
71
+ && update-alternatives --install /usr/bin/python python /usr/local/bin/python3.10 100 \
72
+ && curl "https://bootstrap.pypa.io/pip/get-pip.py" -o get-pip.py \
73
+ && python get-pip.py \
74
+ && rm get-pip.py
46
75
47
76
# LibrePCB's unittests expect that there is a USERNAME environment variable
48
77
ENV USERNAME="root"
0 commit comments