A DEEP DIVE INTO THE OFFICIAL DOCKER IMAGE FOR PYTHON The official Python image for Docker is quite popular, and in fact I recommend one of its variations as a base image . But many people don’t quite understand what it does, which can lead to confusion and brokenness. In this post I will therefore go over how it’s constructed, why it’s useful, how to use it correctly, as well as its limitations. In particular, I’ll be reading through the python:3.8-slim-buster variant, as of August 19, 2020 , and explaining it as I go along. Reading the Dockerfile The base image We start with the base image: FROM debian:buster-slim That is, the base image is Debian GNU/Linux 10, the current stable release of the Debian distribution, also known as Buster because Debian names all their releases after characters from Toy Story. In case you’re wondering, Buster is Andy’s pet dog . So to begin with, this is a Linux distribution that guarantees stability over time, while providing bug fixes. The slim...
Comments
Post a Comment