Skip to content

Commit a5a10a9

Browse files
committed
Remove __pycache__ and test module .so files
The `__pycache__` directories were still be included in the final image. It also missed removing the C-extension tests `*.so` files.
1 parent 2965c79 commit a5a10a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile-linux.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ RUN set -eux; \
251251
\
252252
find /usr/local -depth \
253253
\( \
254-
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
255-
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \
254+
\( -type d -a \( -name test -o -name tests -o -name idle_test -o -name __pycache__ \) \) -o \
255+
\( -type f -a \( -name '*.py[co]' -o -name 'libpython*.a' -o -name *test*.so \) \) \
256256
\) -exec rm -rf '{}' + \
257257
; \
258258
\

0 commit comments

Comments
 (0)