Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 5dad84b

Browse files
committed
Updates from upstream (docker-library/python#311)
1 parent 972dc7b commit 5dad84b

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

2.7/alpine3.6/Dockerfile

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

10+
# extra dependencies (over what alpine-buildpack-deps already includes)
11+
RUN apk add --no-cache \
12+
tk-dev
13+
1014
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
1115
ENV PYTHON_VERSION 2.7.15
1216

@@ -16,6 +20,7 @@ RUN set -ex \
1620
&& export GNUPGHOME="$(mktemp -d)" \
1721
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
1822
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
23+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
1924
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
2025
&& mkdir -p /usr/src/python \
2126
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
@@ -24,9 +29,7 @@ RUN set -ex \
2429
&& apk add --no-cache --virtual .build-deps \
2530
coreutils \
2631
dpkg-dev dpkg \
27-
tcl-dev \
28-
tk \
29-
tk-dev \
32+
findutils \
3033
\
3134
&& cd /usr/src/python \
3235
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -40,14 +43,11 @@ RUN set -ex \
4043
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
4144
&& make install \
4245
\
43-
&& runDeps="$( \
44-
scanelf --needed --nobanner --recursive /usr/local \
45-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
46-
| sort -u \
47-
| xargs -r apk info --installed \
46+
&& find /usr/local -type f -executable -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
47+
| tr ',' '\n' \
4848
| sort -u \
49-
)" \
50-
&& apk add --virtual .python-rundeps $runDeps \
49+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
50+
| xargs -rt apk add --virtual .python-rundeps \
5151
&& apk del .build-deps \
5252
\
5353
&& find /usr/local -depth \

2.7/alpine3.7/Dockerfile

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

10+
# extra dependencies (over what alpine-buildpack-deps already includes)
11+
RUN apk add --no-cache \
12+
tk-dev
13+
1014
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
1115
ENV PYTHON_VERSION 2.7.15
1216

@@ -16,6 +20,7 @@ RUN set -ex \
1620
&& export GNUPGHOME="$(mktemp -d)" \
1721
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
1822
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
23+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
1924
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
2025
&& mkdir -p /usr/src/python \
2126
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
@@ -24,11 +29,9 @@ RUN set -ex \
2429
&& apk add --no-cache --virtual .build-deps \
2530
coreutils \
2631
dpkg-dev dpkg \
32+
findutils \
2733
libnsl-dev \
2834
libtirpc-dev \
29-
tcl-dev \
30-
tk \
31-
tk-dev \
3235
\
3336
&& cd /usr/src/python \
3437
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -42,14 +45,11 @@ RUN set -ex \
4245
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
4346
&& make install \
4447
\
45-
&& runDeps="$( \
46-
scanelf --needed --nobanner --recursive /usr/local \
47-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
48-
| sort -u \
49-
| xargs -r apk info --installed \
48+
&& find /usr/local -type f -executable -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
49+
| tr ',' '\n' \
5050
| sort -u \
51-
)" \
52-
&& apk add --virtual .python-rundeps $runDeps \
51+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
52+
| xargs -rt apk add --virtual .python-rundeps \
5353
&& apk del .build-deps \
5454
\
5555
&& find /usr/local -depth \

3.6/alpine3.6/Dockerfile

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

10+
# extra dependencies (over what alpine-buildpack-deps already includes)
11+
RUN apk add --no-cache \
12+
tk-dev
13+
1014
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
1115
ENV PYTHON_VERSION 3.6.6
1216

@@ -16,6 +20,7 @@ RUN set -ex \
1620
&& export GNUPGHOME="$(mktemp -d)" \
1721
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
1822
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
23+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
1924
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
2025
&& mkdir -p /usr/src/python \
2126
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
@@ -24,9 +29,7 @@ RUN set -ex \
2429
&& apk add --no-cache --virtual .build-deps \
2530
coreutils \
2631
dpkg-dev dpkg \
27-
tcl-dev \
28-
tk \
29-
tk-dev \
32+
findutils \
3033
\
3134
&& cd /usr/src/python \
3235
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -43,14 +46,11 @@ RUN set -ex \
4346
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
4447
&& make install \
4548
\
46-
&& runDeps="$( \
47-
scanelf --needed --nobanner --recursive /usr/local \
48-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
49-
| sort -u \
50-
| xargs -r apk info --installed \
51-
| sort -u \
52-
)" \
53-
&& apk add --virtual .python-rundeps $runDeps \
49+
&& find /usr/local -type f -executable -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
50+
| tr ',' '\n' \
51+
| sort -u \
52+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
53+
| xargs -rt apk add --virtual .python-rundeps \
5454
&& apk del .build-deps \
5555
\
5656
&& find /usr/local -depth \

3.6/alpine3.7/Dockerfile

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

10+
# extra dependencies (over what alpine-buildpack-deps already includes)
11+
RUN apk add --no-cache \
12+
tk-dev
13+
1014
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
1115
ENV PYTHON_VERSION 3.6.6
1216

@@ -16,6 +20,7 @@ RUN set -ex \
1620
&& export GNUPGHOME="$(mktemp -d)" \
1721
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
1822
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
23+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
1924
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
2025
&& mkdir -p /usr/src/python \
2126
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
@@ -24,11 +29,9 @@ RUN set -ex \
2429
&& apk add --no-cache --virtual .build-deps \
2530
coreutils \
2631
dpkg-dev dpkg \
32+
findutils \
2733
libnsl-dev \
2834
libtirpc-dev \
29-
tcl-dev \
30-
tk \
31-
tk-dev \
3235
\
3336
&& cd /usr/src/python \
3437
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -45,14 +48,11 @@ RUN set -ex \
4548
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
4649
&& make install \
4750
\
48-
&& runDeps="$( \
49-
scanelf --needed --nobanner --recursive /usr/local \
50-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
51-
| sort -u \
52-
| xargs -r apk info --installed \
53-
| sort -u \
54-
)" \
55-
&& apk add --virtual .python-rundeps $runDeps \
51+
&& find /usr/local -type f -executable -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
52+
| tr ',' '\n' \
53+
| sort -u \
54+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
55+
| xargs -rt apk add --virtual .python-rundeps \
5656
&& apk del .build-deps \
5757
\
5858
&& find /usr/local -depth \

0 commit comments

Comments
 (0)