craftmaio.blogg.se

Dockerfile from debian
Dockerfile from debian





Further Optimizationsīetter execution speed is great, but that’s just one variable you should worry about when deploying your app. After some research, I found this issue that seems to validate that reasoning. That led me to believe that the biggest factor wasn’t the operating system but how python was compiled. The big surprise was actually the fact that using Ubuntu and manually installing python was the clear winner with more than 20% margin. This led me to start from scratch, benchmark a series of distributions, and create my new default docker image.Īs it turns out, Alpine is not that slower for most of the tests when comparing with the other images from the Python repo. After working so well with my Go projects, I had defaulted to use it with Python to get smaller images. Turns out, Alpine might be small but in some cases, it can slow things down quite a bit due to some of the equivalent libraries that are used. After some research, I stumbled upon this StackOverflow question that questioned the FFmpeg execution performance and my Python code when using Alpine. Since the system had to be very cost-efficient, I wanted to make sure the underlying docker image wasn’t creating too much overhead. In a previous project, I built an elastic transcoder farm that used Docker (Alpine), Python, and FFmpeg. It also contains special optimizations for gunicorn and to build faster and safer. Skip to the end to find a Dockerfile that is +20% faster than using the default one in docker hub. Of course, there is no such thing as perfection and I’ll gladly accept feedback to improve possible issues you might find. This post will share the “perfect” Python Dockerfile.

dockerfile from debian dockerfile from debian

Having a reliable Dockerfile as your base can save you hours of headaches and bigger problems down the road.







Dockerfile from debian