Very new user here, sorry if it’s been asked before, I couldn’t find previous posts (and not 100% sure what keywords to search)… So I have 3 related conceptual questions that I hope someone can confirm or correct.
1: So it appears to me that docker images on the hub are essentially debian systems with pre-installed packages.
For example, the Python image is functionally similar to someone doing
sudo apt install python3-pip
on a fresh debian system, and then ‘pushing’ it onto the hub.
2: Alternatively, one can also ‘pull’ clean debian base and add
RUN sudo apt install python3-pip
to the dockerfile. Hence, this should be functionally identical to case 1 (besides some other miscellaneous processes in installing and setting up python environments).
3: So one can either pull and re-build the image each time the container is run (in the dockerfile with FROM python:3), for each instance to have the most up-to-date packages, OR one can save the image in which python3 is already installed, and always run a container from that image, so eventually the packages will be outdated, but “interior” compatibility is guaranteed forever?