Skip to content

Commit e078edc

Browse files
authored
Merge pull request #307 from JayH5/alpine-3.7+-ca-certs
alpine: Don't install ca-certificates on Alpine 3.7+
2 parents 1565b7e + cc8d232 commit e078edc

File tree

15 files changed

+19
-121
lines changed

15 files changed

+19
-121
lines changed

2.7/alpine3.6/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ ENV LANG C.UTF-8
1515
# https://github.com/docker-library/python/issues/147
1616
ENV PYTHONIOENCODING UTF-8
1717

18-
# install ca-certificates so that HTTPS works consistently
19-
# the other runtime dependencies for Python are installed later
18+
# install ca-certificates so that HTTPS works consistently (other runtime dependencies for Python are installed later); only needed on Alpine 3.6 (3.7+ includes these in the base)
2019
RUN apk add --no-cache ca-certificates
2120

2221
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
@@ -97,12 +96,10 @@ ENV PYTHON_PIP_VERSION 18.0
9796

9897
RUN set -ex; \
9998
\
100-
apk add --no-cache --virtual .fetch-deps libressl; \
99+
apk add --no-cache --virtual .fetch-deps libressl; trap 'apk del .fetch-deps' EXIT; \
101100
\
102101
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
103102
\
104-
apk del .fetch-deps; \
105-
\
106103
python get-pip.py \
107104
--disable-pip-version-check \
108105
--no-cache-dir \

2.7/alpine3.7/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ ENV LANG C.UTF-8
1515
# https://github.com/docker-library/python/issues/147
1616
ENV PYTHONIOENCODING UTF-8
1717

18-
# install ca-certificates so that HTTPS works consistently
19-
# the other runtime dependencies for Python are installed later
20-
RUN apk add --no-cache ca-certificates
21-
2218
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
2319
ENV PYTHON_VERSION 2.7.15
2420

2521
RUN set -ex \
2622
&& apk add --no-cache --virtual .fetch-deps \
2723
gnupg \
28-
libressl \
2924
tar \
3025
xz \
3126
\
@@ -49,7 +44,6 @@ RUN set -ex \
4944
gdbm-dev \
5045
libc-dev \
5146
libnsl-dev \
52-
libressl \
5347
libressl-dev \
5448
libtirpc-dev \
5549
linux-headers \
@@ -98,13 +92,9 @@ RUN set -ex \
9892
ENV PYTHON_PIP_VERSION 18.0
9993

10094
RUN set -ex; \
101-
\
102-
apk add --no-cache --virtual .fetch-deps libressl; \
10395
\
10496
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
10597
\
106-
apk del .fetch-deps; \
107-
\
10898
python get-pip.py \
10999
--disable-pip-version-check \
110100
--no-cache-dir \

2.7/alpine3.8/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ ENV LANG C.UTF-8
1515
# https://github.com/docker-library/python/issues/147
1616
ENV PYTHONIOENCODING UTF-8
1717

18-
# install ca-certificates so that HTTPS works consistently
19-
# the other runtime dependencies for Python are installed later
20-
RUN apk add --no-cache ca-certificates
21-
2218
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
2319
ENV PYTHON_VERSION 2.7.15
2420

2521
RUN set -ex \
2622
&& apk add --no-cache --virtual .fetch-deps \
2723
gnupg \
28-
libressl \
2924
tar \
3025
xz \
3126
\
@@ -49,7 +44,6 @@ RUN set -ex \
4944
gdbm-dev \
5045
libc-dev \
5146
libnsl-dev \
52-
libressl \
5347
libressl-dev \
5448
libtirpc-dev \
5549
linux-headers \
@@ -98,13 +92,9 @@ RUN set -ex \
9892
ENV PYTHON_PIP_VERSION 18.0
9993

10094
RUN set -ex; \
101-
\
102-
apk add --no-cache --virtual .fetch-deps libressl; \
10395
\
10496
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
10597
\
106-
apk del .fetch-deps; \
107-
\
10898
python get-pip.py \
10999
--disable-pip-version-check \
110100
--no-cache-dir \

3.4/alpine3.7/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2117
ENV PYTHON_VERSION 3.4.8
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
libressl \
2722
tar \
2823
xz \
2924
\
@@ -48,7 +43,6 @@ RUN set -ex \
4843
gdbm-dev \
4944
libc-dev \
5045
libffi-dev \
51-
libressl \
5246
libressl-dev \
5347
linux-headers \
5448
make \
@@ -107,13 +101,9 @@ RUN cd /usr/local/bin \
107101
ENV PYTHON_PIP_VERSION 18.0
108102

109103
RUN set -ex; \
110-
\
111-
apk add --no-cache --virtual .fetch-deps libressl; \
112104
\
113105
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114106
\
115-
apk del .fetch-deps; \
116-
\
117107
python get-pip.py \
118108
--disable-pip-version-check \
119109
--no-cache-dir \

3.4/alpine3.8/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2117
ENV PYTHON_VERSION 3.4.8
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
libressl \
2722
tar \
2823
xz \
2924
\
@@ -48,7 +43,6 @@ RUN set -ex \
4843
gdbm-dev \
4944
libc-dev \
5045
libffi-dev \
51-
libressl \
5246
libressl-dev \
5347
linux-headers \
5448
make \
@@ -107,13 +101,9 @@ RUN cd /usr/local/bin \
107101
ENV PYTHON_PIP_VERSION 18.0
108102

109103
RUN set -ex; \
110-
\
111-
apk add --no-cache --virtual .fetch-deps libressl; \
112104
\
113105
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114106
\
115-
apk del .fetch-deps; \
116-
\
117107
python get-pip.py \
118108
--disable-pip-version-check \
119109
--no-cache-dir \

3.5/alpine3.7/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2117
ENV PYTHON_VERSION 3.5.5
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
libressl \
2722
tar \
2823
xz \
2924
\
@@ -48,7 +43,6 @@ RUN set -ex \
4843
gdbm-dev \
4944
libc-dev \
5045
libffi-dev \
51-
libressl \
5246
libressl-dev \
5347
linux-headers \
5448
make \
@@ -107,13 +101,9 @@ RUN cd /usr/local/bin \
107101
ENV PYTHON_PIP_VERSION 18.0
108102

109103
RUN set -ex; \
110-
\
111-
apk add --no-cache --virtual .fetch-deps libressl; \
112104
\
113105
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114106
\
115-
apk del .fetch-deps; \
116-
\
117107
python get-pip.py \
118108
--disable-pip-version-check \
119109
--no-cache-dir \

3.5/alpine3.8/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2117
ENV PYTHON_VERSION 3.5.5
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
openssl \
2722
tar \
2823
xz \
2924
\
@@ -48,7 +43,6 @@ RUN set -ex \
4843
gdbm-dev \
4944
libc-dev \
5045
libffi-dev \
51-
openssl \
5246
openssl-dev \
5347
linux-headers \
5448
make \
@@ -107,13 +101,9 @@ RUN cd /usr/local/bin \
107101
ENV PYTHON_PIP_VERSION 18.0
108102

109103
RUN set -ex; \
110-
\
111-
apk add --no-cache --virtual .fetch-deps openssl; \
112104
\
113105
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114106
\
115-
apk del .fetch-deps; \
116-
\
117107
python get-pip.py \
118108
--disable-pip-version-check \
119109
--no-cache-dir \

3.6/alpine3.6/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

16-
# install ca-certificates so that HTTPS works consistently
17-
# the other runtime dependencies for Python are installed later
16+
# install ca-certificates so that HTTPS works consistently (other runtime dependencies for Python are installed later); only needed on Alpine 3.6 (3.7+ includes these in the base)
1817
RUN apk add --no-cache ca-certificates
1918

2019
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
@@ -108,12 +107,10 @@ ENV PYTHON_PIP_VERSION 18.0
108107

109108
RUN set -ex; \
110109
\
111-
apk add --no-cache --virtual .fetch-deps libressl; \
110+
apk add --no-cache --virtual .fetch-deps libressl; trap 'apk del .fetch-deps' EXIT; \
112111
\
113112
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114113
\
115-
apk del .fetch-deps; \
116-
\
117114
python get-pip.py \
118115
--disable-pip-version-check \
119116
--no-cache-dir \

3.6/alpine3.7/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
2117
ENV PYTHON_VERSION 3.6.6
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
libressl \
2722
tar \
2823
xz \
2924
\
@@ -49,7 +44,6 @@ RUN set -ex \
4944
libc-dev \
5045
libffi-dev \
5146
libnsl-dev \
52-
libressl \
5347
libressl-dev \
5448
libtirpc-dev \
5549
linux-headers \
@@ -109,13 +103,9 @@ RUN cd /usr/local/bin \
109103
ENV PYTHON_PIP_VERSION 18.0
110104

111105
RUN set -ex; \
112-
\
113-
apk add --no-cache --virtual .fetch-deps libressl; \
114106
\
115107
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
116108
\
117-
apk del .fetch-deps; \
118-
\
119109
python get-pip.py \
120110
--disable-pip-version-check \
121111
--no-cache-dir \

3.6/alpine3.8/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ ENV PATH /usr/local/bin:$PATH
1313
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
1414
ENV LANG C.UTF-8
1515

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
19-
2016
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
2117
ENV PYTHON_VERSION 3.6.6
2218

2319
RUN set -ex \
2420
&& apk add --no-cache --virtual .fetch-deps \
2521
gnupg \
26-
libressl \
2722
tar \
2823
xz \
2924
\
@@ -49,7 +44,6 @@ RUN set -ex \
4944
libc-dev \
5045
libffi-dev \
5146
libnsl-dev \
52-
libressl \
5347
libressl-dev \
5448
libtirpc-dev \
5549
linux-headers \
@@ -109,13 +103,9 @@ RUN cd /usr/local/bin \
109103
ENV PYTHON_PIP_VERSION 18.0
110104

111105
RUN set -ex; \
112-
\
113-
apk add --no-cache --virtual .fetch-deps libressl; \
114106
\
115107
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
116108
\
117-
apk del .fetch-deps; \
118-
\
119109
python get-pip.py \
120110
--disable-pip-version-check \
121111
--no-cache-dir \

0 commit comments

Comments
 (0)