Alpine makes Python Docker builds way too(50×) slower, and images double(2×) larger

Nikhil Verma
5 min readFeb 5, 2020

Letting to get off the excuse of “It only works on my machine”, the advent of containerization engines bought with it a boom in technology and nearly a de-facto standard for the same is Docker, today. Containerization with docker engines needs me to understand difference in images, containers and further going to K8s bring clusters and management of nodes between them.

But hey, do you know we can write a docker image per-configured with the libraries, settings and other stuff with the help of something called as a Dockerfile.

Lets see, what is a Dockerfile first-off all

A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession. The docker build command builds an image from a Dockerfile and a context. The build’s context is the set of files at a specified location PATH or URL where the PATH is a directory on your local filesystem.

A typical dockerfile looks somewhat like this….

Dockerfile defines what goes on in the environment inside your container

And commands to run the container made with image are…

--

--

Nikhil Verma
Nikhil Verma

Written by Nikhil Verma

Knowledge shared is knowledge squared | My Portfolio https://lihkinverma.github.io/portfolio/ | My blogs are living document, updated as I receive comments