File tree 9 files changed +23
-61
lines changed
9 files changed +23
-61
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,8 @@ ENV LANG C.UTF-8
9
9
# https://github.com/docker-library/python/issues/147
10
10
ENV PYTHONIOENCODING UTF-8
11
11
12
- # install ca-certificates so that HTTPS works consistently
13
- # the other runtime dependencies for Python are installed later
14
- RUN apk add --no-cache ca-certificates
12
+ # install libressl so that HTTPS works on Alpine <3.7
13
+ RUN apk add --no-cache libressl
15
14
16
15
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
17
16
ENV PYTHON_VERSION 2.7.15
Original file line number Diff line number Diff line change @@ -9,9 +9,8 @@ ENV LANG C.UTF-8
9
9
# https://github.com/docker-library/python/issues/147
10
10
ENV PYTHONIOENCODING UTF-8
11
11
12
- # install ca-certificates so that HTTPS works consistently
13
- # the other runtime dependencies for Python are installed later
14
- RUN apk add --no-cache ca-certificates
12
+ # install libressl so that HTTPS works on Alpine <3.7
13
+ # RUN apk add --no-cache libressl
15
14
16
15
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
17
16
ENV PYTHON_VERSION 2.7.15
Original file line number Diff line number Diff line change @@ -13,17 +13,15 @@ ENV PATH /usr/local/bin:$PATH
13
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14
14
ENV LANG C.UTF-8
15
15
16
- # install ca-certificates so that HTTPS works consistently
17
- # the other runtime dependencies for Python are installed later
18
- RUN apk add --no-cache ca-certificates
16
+ # install libressl so that HTTPS works on Alpine <3.7
17
+ # RUN apk add --no-cache libressl
19
18
20
19
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
21
20
ENV PYTHON_VERSION 3.4.8
22
21
23
22
RUN set -ex \
24
23
&& apk add --no-cache --virtual .fetch-deps \
25
24
gnupg \
26
- libressl \
27
25
tar \
28
26
xz \
29
27
\
@@ -46,7 +44,6 @@ RUN set -ex \
46
44
gdbm-dev \
47
45
libc-dev \
48
46
libffi-dev \
49
- libressl \
50
47
libressl-dev \
51
48
linux-headers \
52
49
make \
@@ -105,13 +102,9 @@ RUN cd /usr/local/bin \
105
102
ENV PYTHON_PIP_VERSION 10.0.1
106
103
107
104
RUN set -ex; \
108
- \
109
- apk add --no-cache --virtual .fetch-deps libressl; \
110
105
\
111
106
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
112
107
\
113
- apk del .fetch-deps; \
114
- \
115
108
python get-pip.py \
116
109
--disable-pip-version-check \
117
110
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -13,17 +13,15 @@ ENV PATH /usr/local/bin:$PATH
13
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14
14
ENV LANG C.UTF-8
15
15
16
- # install ca-certificates so that HTTPS works consistently
17
- # the other runtime dependencies for Python are installed later
18
- RUN apk add --no-cache ca-certificates
16
+ # install libressl so that HTTPS works on Alpine <3.7
17
+ # RUN apk add --no-cache libressl
19
18
20
19
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
21
20
ENV PYTHON_VERSION 3.5.5
22
21
23
22
RUN set -ex \
24
23
&& apk add --no-cache --virtual .fetch-deps \
25
24
gnupg \
26
- libressl \
27
25
tar \
28
26
xz \
29
27
\
@@ -46,7 +44,6 @@ RUN set -ex \
46
44
gdbm-dev \
47
45
libc-dev \
48
46
libffi-dev \
49
- libressl \
50
47
libressl-dev \
51
48
linux-headers \
52
49
make \
@@ -105,13 +102,9 @@ RUN cd /usr/local/bin \
105
102
ENV PYTHON_PIP_VERSION 10.0.1
106
103
107
104
RUN set -ex; \
108
- \
109
- apk add --no-cache --virtual .fetch-deps libressl; \
110
105
\
111
106
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
112
107
\
113
- apk del .fetch-deps; \
114
- \
115
108
python get-pip.py \
116
109
--disable-pip-version-check \
117
110
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -13,17 +13,15 @@ ENV PATH /usr/local/bin:$PATH
13
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14
14
ENV LANG C.UTF-8
15
15
16
- # install ca-certificates so that HTTPS works consistently
17
- # the other runtime dependencies for Python are installed later
18
- RUN apk add --no-cache ca-certificates
16
+ # install libressl so that HTTPS works on Alpine <3.7
17
+ RUN apk add --no-cache libressl
19
18
20
19
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
21
20
ENV PYTHON_VERSION 3.6.6
22
21
23
22
RUN set -ex \
24
23
&& apk add --no-cache --virtual .fetch-deps \
25
24
gnupg \
26
- libressl \
27
25
tar \
28
26
xz \
29
27
\
@@ -46,7 +44,6 @@ RUN set -ex \
46
44
gdbm-dev \
47
45
libc-dev \
48
46
libffi-dev \
49
- libressl \
50
47
libressl-dev \
51
48
linux-headers \
52
49
make \
@@ -105,13 +102,9 @@ RUN cd /usr/local/bin \
105
102
ENV PYTHON_PIP_VERSION 10.0.1
106
103
107
104
RUN set -ex; \
108
- \
109
- apk add --no-cache --virtual .fetch-deps libressl; \
110
105
\
111
106
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
112
107
\
113
- apk del .fetch-deps; \
114
- \
115
108
python get-pip.py \
116
109
--disable-pip-version-check \
117
110
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -13,17 +13,15 @@ ENV PATH /usr/local/bin:$PATH
13
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14
14
ENV LANG C.UTF-8
15
15
16
- # install ca-certificates so that HTTPS works consistently
17
- # the other runtime dependencies for Python are installed later
18
- RUN apk add --no-cache ca-certificates
16
+ # install libressl so that HTTPS works on Alpine <3.7
17
+ # RUN apk add --no-cache libressl
19
18
20
19
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
21
20
ENV PYTHON_VERSION 3.6.6
22
21
23
22
RUN set -ex \
24
23
&& apk add --no-cache --virtual .fetch-deps \
25
24
gnupg \
26
- libressl \
27
25
tar \
28
26
xz \
29
27
\
@@ -47,7 +45,6 @@ RUN set -ex \
47
45
libc-dev \
48
46
libffi-dev \
49
47
libnsl-dev \
50
- libressl \
51
48
libressl-dev \
52
49
libtirpc-dev \
53
50
linux-headers \
@@ -107,13 +104,9 @@ RUN cd /usr/local/bin \
107
104
ENV PYTHON_PIP_VERSION 10.0.1
108
105
109
106
RUN set -ex; \
110
- \
111
- apk add --no-cache --virtual .fetch-deps libressl; \
112
107
\
113
108
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
114
109
\
115
- apk del .fetch-deps; \
116
- \
117
110
python get-pip.py \
118
111
--disable-pip-version-check \
119
112
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -13,17 +13,15 @@ ENV PATH /usr/local/bin:$PATH
13
13
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14
14
ENV LANG C.UTF-8
15
15
16
- # install ca-certificates so that HTTPS works consistently
17
- # the other runtime dependencies for Python are installed later
18
- RUN apk add --no-cache ca-certificates
16
+ # install libressl so that HTTPS works on Alpine <3.7
17
+ # RUN apk add --no-cache libressl
19
18
20
19
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
21
20
ENV PYTHON_VERSION 3.7.0
22
21
23
22
RUN set -ex \
24
23
&& apk add --no-cache --virtual .fetch-deps \
25
24
gnupg \
26
- openssl \
27
25
tar \
28
26
xz \
29
27
\
@@ -47,7 +45,6 @@ RUN set -ex \
47
45
libc-dev \
48
46
libffi-dev \
49
47
libnsl-dev \
50
- openssl \
51
48
openssl-dev \
52
49
libtirpc-dev \
53
50
linux-headers \
@@ -107,13 +104,9 @@ RUN cd /usr/local/bin \
107
104
ENV PYTHON_PIP_VERSION 10.0.1
108
105
109
106
RUN set -ex; \
110
- \
111
- apk add --no-cache --virtual .fetch-deps openssl; \
112
107
\
113
108
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
114
109
\
115
- apk del .fetch-deps; \
116
- \
117
110
python get-pip.py \
118
111
--disable-pip-version-check \
119
112
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -7,17 +7,15 @@ ENV PATH /usr/local/bin:$PATH
7
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
8
ENV LANG C.UTF-8
9
9
10
- # install ca-certificates so that HTTPS works consistently
11
- # the other runtime dependencies for Python are installed later
12
- RUN apk add --no-cache ca-certificates
10
+ # install libressl so that HTTPS works on Alpine <3.7
11
+ # RUN apk add --no-cache libressl
13
12
14
13
ENV GPG_KEY %%PLACEHOLDER%%
15
14
ENV PYTHON_VERSION %%PLACEHOLDER%%
16
15
17
16
RUN set -ex \
18
17
&& apk add --no-cache --virtual .fetch-deps \
19
18
gnupg \
20
- libressl \
21
19
tar \
22
20
xz \
23
21
\
@@ -41,7 +39,6 @@ RUN set -ex \
41
39
libc-dev \
42
40
libffi-dev \
43
41
libnsl-dev \
44
- libressl \
45
42
libressl-dev \
46
43
libtirpc-dev \
47
44
linux-headers \
@@ -101,13 +98,9 @@ RUN cd /usr/local/bin \
101
98
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
102
99
103
100
RUN set -ex; \
104
- \
105
- apk add --no-cache --virtual .fetch-deps libressl; \
106
101
\
107
102
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
108
103
\
109
- apk del .fetch-deps; \
110
- \
111
104
python get-pip.py \
112
105
--disable-pip-version-check \
113
106
--no-cache-dir \
Original file line number Diff line number Diff line change @@ -153,10 +153,16 @@ for version in "${versions[@]}"; do
153
153
wheezy) sed -ri -e ' s/dpkg-architecture --query /dpkg-architecture -q/g' " $dir /Dockerfile" ;;
154
154
esac
155
155
156
+ # On Alpine 3.6 it's necessary to install libressl to get working HTTPS.
157
+ # Later Alpine versions have CA certificates pre-installed.
158
+ if [[ " $variant " == alpine3.6 ]]; then
159
+ sed -ri -e ' /^# .* libressl$/s/^# //' " $dir /Dockerfile"
160
+ fi
161
+
156
162
# https://bugs.python.org/issue32598 (Python 3.7.0b1+)
157
163
# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL doesn't implement (yet?)
158
164
if [[ " $version " == 3.7* ]] && [[ " $variant " == alpine* ]]; then
159
- sed -ri -e ' s/libressl/openssl/g' " $dir /Dockerfile"
165
+ sed -ri -e ' s/libressl-dev /openssl-dev /g' " $dir /Dockerfile"
160
166
fi
161
167
162
168
# Libraries to build the nis module only available in Alpine 3.7+.
You can’t perform that action at this time.
0 commit comments