Tuesday, May 25, 2021

Python⇒Speed: Shrinking your Python application's Docker image: an overview

You’ve finished building the initial Docker image for your Python application, you push it to the registry–and that takes a while, because your image is 2GB. Your image is clearly too large, and so your next step is to try to make your Docker image smaller.

In this article you’ll find an overview of the many techniques you can use to shrink your image, organized approximately by logical order packaging. The focus is on Python, though many of these techniques are more generic. Techniques are broken down by category, with each suggesting follow-up articles covering the details:

  1. Base image.
  2. Docker layers and their impact on image size.
  3. System packages (apt/dnf) and Python packages.
  4. Avoid copying unnecessary files.
  5. Additional tools, tips, and techniques.
Read more...

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...