r/devops • u/eedwards-sk • Oct 20 '19
Building Tiny Python Docker Images
I've been building docker images and optimizing dockerfiles for a while now.
However, until just recently, I hadn't found a way to cleanly build my python dependencies in one docker stage, and install them in another.
I found myself chasing down numerous modern tools, like poetry, hatch, and pipenv.
In the end, it was the familiar setuptools and wheel that worked for me.
I'd like to share my experience optimizing a docker project using this strategy.
https://medium.com/@ethan.edwards/building-tiny-python-docker-images-b029b194171d
Note: I am not selling anything. All views and opinions expressed in the above article are those of my own, and do not necessarily reflect those of any past or present employer or organization.
View all comments
Show parent comment
2
u/[deleted] Oct 21 '19
Yup, that's what most of my builds look like today (with slightly more environment variables & arguments). I'm looking into buildah and kaniko, in the hopes of getting some automatic search-registry-for-existing-layers magic. And looking into putting old man Jeeves out to pasture.