-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
It seems that find -exec rm -rf '{}' +
command that is used to purge tests and *.py[co]
(https://github.com/docker-library/python/blob/master/2.7/alpine/Dockerfile#L46-L49) didn't achieve its goal. The tests are still in the image, and contribute 16~20M image size.
You can check it out by running
$ docker run --rm python:2-alpine find /usr/local \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \)
/usr/local/lib/python2.7/lib2to3/tests
/usr/local/lib/python2.7/ctypes/test
/usr/local/lib/python2.7/json/tests
/usr/local/lib/python2.7/sqlite3/test
/usr/local/lib/python2.7/lib-tk/test
/usr/local/lib/python2.7/unittest/test
/usr/local/lib/python2.7/distutils/tests
/usr/local/lib/python2.7/test
/usr/local/lib/python2.7/site-packages/wheel/test
/usr/local/lib/python2.7/email/test
/usr/local/lib/python2.7/bsddb/test
$ docker run --rm python:alpine find /usr/local \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \)
/usr/local/lib/python3.5/lib2to3/tests
/usr/local/lib/python3.5/ctypes/test
/usr/local/lib/python3.5/sqlite3/test
/usr/local/lib/python3.5/unittest/test
/usr/local/lib/python3.5/distutils/tests
/usr/local/lib/python3.5/test
/usr/local/lib/python3.5/tkinter/test
Metadata
Metadata
Assignees
Labels
No labels