Skip to content

Commit 5d71a7c

Browse files
authored
Merge pull request docker-library#508 from infosiftr/no-a-files
Adjust installation order and purge "libpythonXX.a" files
2 parents dcf0dd4 + 7a3801a commit 5d71a7c

File tree

29 files changed

+206
-188
lines changed

29 files changed

+206
-188
lines changed

3.5/alpine3.11/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ RUN set -ex \
116116
test_unicode \
117117
' \
118118
&& make install \
119+
&& rm -rf /usr/src/python \
120+
\
121+
&& find /usr/local -depth \
122+
\( \
123+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
124+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
125+
-o \( -type f -a -name 'wininst-*.exe' \) \
126+
\) -exec rm -rf '{}' + \
119127
\
120128
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
121129
| tr ',' '\n' \
@@ -124,14 +132,6 @@ RUN set -ex \
124132
| xargs -rt apk add --no-cache --virtual .python-rundeps \
125133
&& apk del --no-network .build-deps \
126134
\
127-
&& find /usr/local -depth \
128-
\( \
129-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
130-
-o \
131-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
132-
\) -exec rm -rf '{}' + \
133-
&& rm -rf /usr/src/python \
134-
\
135135
&& python3 --version
136136

137137
# make some useful symlinks that are expected to exist

3.5/alpine3.12/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ RUN set -ex \
116116
test_unicode \
117117
' \
118118
&& make install \
119+
&& rm -rf /usr/src/python \
120+
\
121+
&& find /usr/local -depth \
122+
\( \
123+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
124+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
125+
-o \( -type f -a -name 'wininst-*.exe' \) \
126+
\) -exec rm -rf '{}' + \
119127
\
120128
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
121129
| tr ',' '\n' \
@@ -124,14 +132,6 @@ RUN set -ex \
124132
| xargs -rt apk add --no-cache --virtual .python-rundeps \
125133
&& apk del --no-network .build-deps \
126134
\
127-
&& find /usr/local -depth \
128-
\( \
129-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
130-
-o \
131-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
132-
\) -exec rm -rf '{}' + \
133-
&& rm -rf /usr/src/python \
134-
\
135135
&& python3 --version
136136

137137
# make some useful symlinks that are expected to exist

3.5/buster/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,16 @@ RUN set -ex \
8484
test_unicode \
8585
' \
8686
&& make install \
87-
&& ldconfig \
87+
&& rm -rf /usr/src/python \
8888
\
8989
&& find /usr/local -depth \
9090
\( \
9191
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
92-
-o \
93-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
92+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
93+
-o \( -type f -a -name 'wininst-*.exe' \) \
9494
\) -exec rm -rf '{}' + \
95-
&& rm -rf /usr/src/python \
95+
\
96+
&& ldconfig \
9697
\
9798
&& python3 --version
9899

3.5/buster/slim/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ RUN set -ex \
108108
test_unicode \
109109
' \
110110
&& make install \
111+
&& rm -rf /usr/src/python \
112+
\
113+
&& find /usr/local -depth \
114+
\( \
115+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
116+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
117+
-o \( -type f -a -name 'wininst-*.exe' \) \
118+
\) -exec rm -rf '{}' + \
119+
\
111120
&& ldconfig \
112121
\
113122
&& apt-mark auto '.*' > /dev/null \
@@ -122,14 +131,6 @@ RUN set -ex \
122131
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
123132
&& rm -rf /var/lib/apt/lists/* \
124133
\
125-
&& find /usr/local -depth \
126-
\( \
127-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
128-
-o \
129-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
130-
\) -exec rm -rf '{}' + \
131-
&& rm -rf /usr/src/python \
132-
\
133134
&& python3 --version
134135

135136
# make some useful symlinks that are expected to exist

3.5/stretch/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,16 @@ RUN set -ex \
8484
test_unicode \
8585
' \
8686
&& make install \
87-
&& ldconfig \
87+
&& rm -rf /usr/src/python \
8888
\
8989
&& find /usr/local -depth \
9090
\( \
9191
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
92-
-o \
93-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
92+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
93+
-o \( -type f -a -name 'wininst-*.exe' \) \
9494
\) -exec rm -rf '{}' + \
95-
&& rm -rf /usr/src/python \
95+
\
96+
&& ldconfig \
9697
\
9798
&& python3 --version
9899

3.5/stretch/slim/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ RUN set -ex \
108108
test_unicode \
109109
' \
110110
&& make install \
111+
&& rm -rf /usr/src/python \
112+
\
113+
&& find /usr/local -depth \
114+
\( \
115+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
116+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
117+
-o \( -type f -a -name 'wininst-*.exe' \) \
118+
\) -exec rm -rf '{}' + \
119+
\
111120
&& ldconfig \
112121
\
113122
&& apt-mark auto '.*' > /dev/null \
@@ -122,14 +131,6 @@ RUN set -ex \
122131
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
123132
&& rm -rf /var/lib/apt/lists/* \
124133
\
125-
&& find /usr/local -depth \
126-
\( \
127-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
128-
-o \
129-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
130-
\) -exec rm -rf '{}' + \
131-
&& rm -rf /usr/src/python \
132-
\
133134
&& python3 --version
134135

135136
# make some useful symlinks that are expected to exist

3.6/alpine3.11/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ RUN set -ex \
118118
test_unicode \
119119
' \
120120
&& make install \
121+
&& rm -rf /usr/src/python \
122+
\
123+
&& find /usr/local -depth \
124+
\( \
125+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
126+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
127+
-o \( -type f -a -name 'wininst-*.exe' \) \
128+
\) -exec rm -rf '{}' + \
121129
\
122130
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
123131
| tr ',' '\n' \
@@ -126,14 +134,6 @@ RUN set -ex \
126134
| xargs -rt apk add --no-cache --virtual .python-rundeps \
127135
&& apk del --no-network .build-deps \
128136
\
129-
&& find /usr/local -depth \
130-
\( \
131-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
132-
-o \
133-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
134-
\) -exec rm -rf '{}' + \
135-
&& rm -rf /usr/src/python \
136-
\
137137
&& python3 --version
138138

139139
# make some useful symlinks that are expected to exist

3.6/alpine3.12/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ RUN set -ex \
118118
test_unicode \
119119
' \
120120
&& make install \
121+
&& rm -rf /usr/src/python \
122+
\
123+
&& find /usr/local -depth \
124+
\( \
125+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
126+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
127+
-o \( -type f -a -name 'wininst-*.exe' \) \
128+
\) -exec rm -rf '{}' + \
121129
\
122130
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
123131
| tr ',' '\n' \
@@ -126,14 +134,6 @@ RUN set -ex \
126134
| xargs -rt apk add --no-cache --virtual .python-rundeps \
127135
&& apk del --no-network .build-deps \
128136
\
129-
&& find /usr/local -depth \
130-
\( \
131-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
132-
-o \
133-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
134-
\) -exec rm -rf '{}' + \
135-
&& rm -rf /usr/src/python \
136-
\
137137
&& python3 --version
138138

139139
# make some useful symlinks that are expected to exist

3.6/buster/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,16 @@ RUN set -ex \
8484
test_unicode \
8585
' \
8686
&& make install \
87-
&& ldconfig \
87+
&& rm -rf /usr/src/python \
8888
\
8989
&& find /usr/local -depth \
9090
\( \
9191
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
92-
-o \
93-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
92+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
93+
-o \( -type f -a -name 'wininst-*.exe' \) \
9494
\) -exec rm -rf '{}' + \
95-
&& rm -rf /usr/src/python \
95+
\
96+
&& ldconfig \
9697
\
9798
&& python3 --version
9899

3.6/buster/slim/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ RUN set -ex \
108108
test_unicode \
109109
' \
110110
&& make install \
111+
&& rm -rf /usr/src/python \
112+
\
113+
&& find /usr/local -depth \
114+
\( \
115+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
116+
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
117+
-o \( -type f -a -name 'wininst-*.exe' \) \
118+
\) -exec rm -rf '{}' + \
119+
\
111120
&& ldconfig \
112121
\
113122
&& apt-mark auto '.*' > /dev/null \
@@ -122,14 +131,6 @@ RUN set -ex \
122131
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
123132
&& rm -rf /var/lib/apt/lists/* \
124133
\
125-
&& find /usr/local -depth \
126-
\( \
127-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
128-
-o \
129-
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
130-
\) -exec rm -rf '{}' + \
131-
&& rm -rf /usr/src/python \
132-
\
133134
&& python3 --version
134135

135136
# make some useful symlinks that are expected to exist

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy