diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 2245e2990..2e9d32612 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -227,12 +227,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ {{ if is_alpine then ( -}} find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \