1

I have a question about container images, as I am learning more about containers and Docker.

When I use Docker, I can run an Alpine image. But I can also run, let's say, a Node-alpine image, which under the hood is based on the Apline image.

At this point, what is exactly the difference betweeen an image named after an OS and an application image named after a software? Is it only that the former is the set of libraries and tools of that OS while the latter is the set of libraries and tools of that OS PLUS the software, e.g. in this case Alpine plus Node.js?

Maybe my question comes from this other question: why are there images named after OSes? From my understanding those images are just a collection of libraries and tools that are typical of that OS (without the kernel, which is provided by the Host OS) that get installed and run in the container.

I would happily like to know more data about these things so as to relate them appropriately and have a better understanding of this topic.

Kenna
  • 121
  • 3

1 Answers1

0

The main difference between same software/different Linux distro flavors is that in the latter case you get the part of the userland of the corresponding OS:

  • for node-alpine you get Alpine userland in the container,which maily means you will have to use apk for a packet manager if you want some modifications (but this difference is not the only of course).
  • for node-buster you get Debian userland and will have to use APT for image modifications (along with all of the weirdnedd you inherit from Debian - the complexibility of the stanard software configuration files which get splitted into 9000 includes and then madly organized) and a significally larger image.
  • for node-buster-slim you get almost the same, but the image authors took effort to make the image slightly thinner.
  • for node-bullseye you get Debian userland environment but more recent versions of it (along with more recent software versions of the software from it embedded repositories).

and so on.

drookie
  • 8,625
  • 1
  • 19
  • 29
  • Thanks. So the difference between Alpine and node-alpine images is simply that in the former is just Alpine userland, while in the latter is Alpine userland plus Node.js and its required dependencies, right? If you would like to share this bit of extra information in your answer, then I can proceed to accept it as it would solve definitely my question :) – Kenna Sep 29 '22 at 14:23