If you work with web services, you’re probably using containers… and you’re also probably not doing it as well as you could. In this talk, we’ll go over best practices for container images to produce lightweight, safe and modular containers for quick and efficient builds.
Previous basic knowledge on containers/Docker/containerfiles/Dockerfiles would be recommended.
Containers are ubiquitous in today’s world. Almost everyone uses them, but how many of them are as well built as they should? Images usually border the line between backend and ops work, which means that the expertise might be diluted. Added to the fact that the symptoms of suboptimal images can be hard to spot at first glance, this point is usually a blind spot for many engineering teams. On the flip side, the benefits of having slimmer images isn’t just size for size’s sake, it’s smaller surface area for vulnerabilities, quicker builds which mean lower cost and ramp-up time, and faster re-builds in development or testing environments leading to quicker development iteration.
In this talk, we’re gonna take a look at all the different ways we can optimize our Python image builds. Differences between base images, image composition, demystifying multi-stage builds, removing unnecessary packages, dependencies and caches from the final result, the build cache and how to best use it, etc. We’ll see all of this and more, and finally, we’ll wrap up with quick overviews of extra tooling that can be used for extremely small sizes, and notes for multi-arch builds.
Daniel is a software engineer with a background in first, local, and then international and VC-backed startups. He's now the lead engineer at Reckon Digital, where he directs and coordinates several projects with clients such as the UN's World Food Programme.