I've just seen that my web applications docker image is enormous. A 600-MB reason is the packages I install for it. The biggest single offender is botocore with 77.7 MB.
Apparently this is known behavior: https://github.com/boto/botocore/issues/1629
Is it possible to redue that size?
Analysis
- The
tar.gz
distribution is just 10.8 MB: https://pypi.org/project/botocore/#files - 75MB are in the
data
directory - For every single AWS service, there seem to be multiple folders (some kind of versioning?) and a
service-2.json
- The
service-2.json
files probably use most of the space. They are not minified and they contain a lot of information that seems not to be necessary for running a production system (e.g.description
).
Is there a way to either completely avoid botocore or in any other way reduce botocores size for the Docker image? (I'm only using S3)