Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Which docker base image to use in the dockerfile?


Asked by Tori Prince on Dec 02, 2021 Docker



The most commonly used base image when creating Docker images is Alpine because it is small and optimized to be run in RAM. The Docker Hub is cloud-based registry service which among other functionalities is used for keeping the Docker images either in a public or private repository.
Also Know,
In Docker a base image is what your current image is built on top of. If you start with a CentOS image then add apache and nginx on top to create a web server image then the CentOS image is the base. Let's suppose I built something on top. Now someone in my team takes the web server image and installs a few applications on it.
Consequently, A Dockerfile adheres to a specific format and set of instructions which you can find at Dockerfile reference. A Docker image consists of read-only layers each of which represents a Dockerfile instruction. The layers are stacked and each one is a delta of the changes from the previous layer.
Likewise,
Compatible with docker-compose v2 schemas. Docker images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively.
In addition,
A Docker image is a tar archive that contains a top level repositories files, and then a number of layers stored as directories containing a json file with some metadata about the layer and a tar file named layer.tar with the layer content. For example, if you docker save busybox, you get: