Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc8d232

Browse files
committed
Adjust implementation for smaller diff from existing (keeping "ca-certificates" installed and removing "libressl" after downloading)
1 parent 93c1436 commit cc8d232

File tree

15 files changed

+34
-43
lines changed

15 files changed

+34
-43
lines changed

2.7/alpine3.6/Dockerfile

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

18-
# install libressl so that HTTPS works on Alpine <3.7
19-
RUN apk add --no-cache libressl
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)
19+
RUN apk add --no-cache ca-certificates
2020

2121
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
2222
ENV PYTHON_VERSION 2.7.15
2323

2424
RUN set -ex \
2525
&& apk add --no-cache --virtual .fetch-deps \
2626
gnupg \
27+
libressl \
2728
tar \
2829
xz \
2930
\
@@ -46,6 +47,7 @@ RUN set -ex \
4647
gcc \
4748
gdbm-dev \
4849
libc-dev \
50+
libressl \
4951
libressl-dev \
5052
linux-headers \
5153
make \
@@ -93,6 +95,8 @@ RUN set -ex \
9395
ENV PYTHON_PIP_VERSION 18.0
9496

9597
RUN set -ex; \
98+
\
99+
apk add --no-cache --virtual .fetch-deps libressl; trap 'apk del .fetch-deps' EXIT; \
96100
\
97101
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
98102
\

2.7/alpine3.7/Dockerfile

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

18-
# install libressl so that HTTPS works on Alpine <3.7
19-
# RUN apk add --no-cache libressl
20-
2118
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
2219
ENV PYTHON_VERSION 2.7.15
2320

2.7/alpine3.8/Dockerfile

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

18-
# install libressl so that HTTPS works on Alpine <3.7
19-
# RUN apk add --no-cache libressl
20-
2118
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
2219
ENV PYTHON_VERSION 2.7.15
2320

3.4/alpine3.7/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2017
ENV PYTHON_VERSION 3.4.8
2118

3.4/alpine3.8/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2017
ENV PYTHON_VERSION 3.4.8
2118

3.5/alpine3.7/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2017
ENV PYTHON_VERSION 3.5.5
2118

3.5/alpine3.8/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
2017
ENV PYTHON_VERSION 3.5.5
2118

3.6/alpine3.6/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
RUN apk add --no-cache libressl
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)
17+
RUN apk add --no-cache ca-certificates
1818

1919
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
2020
ENV PYTHON_VERSION 3.6.6
2121

2222
RUN set -ex \
2323
&& apk add --no-cache --virtual .fetch-deps \
2424
gnupg \
25+
libressl \
2526
tar \
2627
xz \
2728
\
@@ -46,6 +47,7 @@ RUN set -ex \
4647
gdbm-dev \
4748
libc-dev \
4849
libffi-dev \
50+
libressl \
4951
libressl-dev \
5052
linux-headers \
5153
make \
@@ -104,6 +106,8 @@ RUN cd /usr/local/bin \
104106
ENV PYTHON_PIP_VERSION 18.0
105107

106108
RUN set -ex; \
109+
\
110+
apk add --no-cache --virtual .fetch-deps libressl; trap 'apk del .fetch-deps' EXIT; \
107111
\
108112
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
109113
\

3.6/alpine3.7/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
2017
ENV PYTHON_VERSION 3.6.6
2118

3.6/alpine3.8/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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 libressl so that HTTPS works on Alpine <3.7
17-
# RUN apk add --no-cache libressl
18-
1916
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
2017
ENV PYTHON_VERSION 3.6.6
2118

0 commit comments

Comments
 (0)