-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fixes: Removal of test folders #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes: Removal of test folders #102
Conversation
b0ae780
to
bb92d66
Compare
Couldn't this also be solved with another set of ie: && find /usr/local \
\( \
\( -type d -a \( -name test -o -name tests \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' + \
&& rm -rf /usr/src/python |
@tianon That is how I started initially , but since test folder also has *.pyc files , find command command errors out (at-least in alpine linux, not tried others). Here is the output of failed docker build :
Here is the dockerfile for the same: |
oh 😞 LGTM, thanks! 👍 |
We can guarantee order with |
@yosifkit You rock. I did not knew
I will reset back to master and apply this change instead. |
33747f3
to
22af00a
Compare
78de7d7
to
3232863
Compare
Travis failed but looks like it should pass if build is retriggered. |
Nice! LGTM 👍 |
LGTM |
- `cassandra`: 2.2.6 and 2.1.14 - `elasticsearch`: 2.3.2 (docker-library/elasticsearch#101) - `hello-world`: update userguide link to avoid redirect (docker-library/hello-world#12) - `java`: 7u101-2.6.6-1~deb8u1 (https://lists.debian.org/debian-security-announce/2016/msg00134.html) - `logstash`: 2.3.2 (docker-library/logstash#46) - `mariadb`: fix double install of `mysql-common` (MariaDB/mariadb-docker#56) - `python`: fix removal of test folders (docker-library/python#102) - `rocket.chat`: 0.28.0 - `ruby`: 2.3.1 and 2.2.5 - `tomcat`: add Tomcat Native Libraries (docker-library/tomcat#28) - `wordpress`: 4.5.1
- `cassandra`: 2.2.6 and 2.1.14 - `elasticsearch`: 2.3.2 (docker-library/elasticsearch#101) - `hello-world`: update userguide link to avoid redirect (docker-library/hello-world#12) - `java`: 7u101-2.6.6-1~deb8u1 (https://lists.debian.org/debian-security-announce/2016/msg00134.html) - `logstash`: 2.3.2 (docker-library/logstash#46) - `mariadb`: fix double install of `mysql-common` (MariaDB/mariadb-docker#56) - `python`: fix removal of test folders (docker-library/python#102) - `rocket.chat`: 0.28.0 - `ruby`: 2.3.1 and 2.2.5 - `tomcat`: add Tomcat Native Libraries (docker-library/tomcat#28) - `wordpress`: 4.5.1
Problem
Find command as defined in Dockerfile was not deleting the test folders.
As a result it contributed a significant chunk to alpine docker images.
Fix:
Execute exec for each action group.
Note: Placing it in a single group does not guarantee the order and might cause issue when pyc files are present in test folder. Deleting independently for both conditions does not cause this issue.
Image Size
Before Fix (alpine : 3.5.1): 89.74 MB
After Fix (alpine: 3.5.1): 72.07 MB