Docker images are often available with different base OS images.
I am not going to install other applications in that container. I will have separate container for each application I need.
Does it matter which base image I choose? If not why would I choose a larger image instead of a smaller one? What would I be giving away?
For example, Kong image is available in two variants with very different sizes:
CentOS based – 143.23 MB
Alpine based – 42.71 MB
https://hub.docker.com/_/kong?tab=tags
BTW, I am going to run the docker on Ubuntu.
2
Answers
As mentioned in the comment it totally depends upon your need, but in the mentioned two images I will go for alpine.
Yes its matter, there are a different reason to choose smaller one, some advantage may be
You can read the experimental base article here.
SMALL
alpinelinux
If you’re only going to run the image as-is, as I assume from
then it doesn’t matter (unless the image’s developer notes it does, of course!).
If you’re going to use one of those images as a base image, then it does matter some – as noted here in comments and answers, the different distributions these images are based on have different tools and capabilities (Ubuntu/Debian has
apt
for a package manager, Alpine uses musl libc and hasapk
).At that point, you’ll want to choose a base image that has the tooling you’re comfortable with and supports the changes you’ll be enacting on top of the base image.