131 private links
When it’s time to package up your Python application into a Docker image, the natural thing to do is search the web for some examples. And a quick search will provide you with plenty of simple, easy examples. Unfortunately, these simple, easy examples are often broken in a variety of ways, some obvious, some less so. To demonstrate just some of the ways they’re broken, I’m going to: Start with an example Dockerfile that comes up fairly high on some Google searches. Show how it’s broken. Give some suggestions on how to make it less broken. Note: Outside the specific topic under discussion, the Dockerfiles in this article are not examples of best practices, since the added complexity would obscure the main point of the article. Learn more about best-practices Docker images for Python.