Remove python bytecode
pmav99 opened this issue · comments
Hi @zarch,
You could probably try to further reduce the image size by removing the python bytecode from the image. Something like this should do it:
find / -name *.pyc -delete
find / -name *__pycache__* -delete
Not sure how much it will help on Alpine but on occasion I 've seen a reduction of 5-10MB. To easily test how much space can be gained, you can use this on a container of the current image:
find / -name *.pyc -exec du -ch {} + | tail -n1