This topic is to discuss the following lesson:
Hi Rene
If i undertand well I can replace the usage of VM by containers
If i have centos 7 installed can I have a container of Centos 7 with differents IP ?
Hello Fabrice,
It depends on the application but often it is possible to replace a VM with one or more containers. Be aware that you don’t treat containers as “mini VMs”. It’s possible to build a container with multiple applications but the idea behind containers is that each container only runs a single process.
There is a official CentOS container btw:
https://hub.docker.com/_/centos?tab=description
With a docker container it’s possible to add a static IP to each container.
Rene
Can explain what this statement says,
Immutability: container images are built based on a “blueprint”. The freeradius image I mentioned earlier is aDockercontainer; the blueprint is called aDockerfile. When you change your code, you build a new container image.
Hello Gowtham
Welcome back! Immutability, in general, is a word that means “unchangeable” or “unmodifiable”. When we apply it in terms of Docker and other technological concepts (such as blockchain), we are referring to an immutable, unchangeable, read-only entity. If you want to modify it, you can’t. You must create a new one with the new parameters you want. Let’s dig deeper…
A Dockerfile is a blueprint (aka recipe) containing step-by-step instructions to build a container image. It specifies the base OS, packages to install, files to copy, configurations, and commands to run.
A container image is the compiled result of processing that Dockerfile. Once built, this image is immutable. It has that unmodifiable characteristic. This is the way Docker is built, it is a primary rule that cannot and should not be broken. Think of it as a frozen, read-only snapshot of your application at a specific point in time. Finally, a container is a running instance created from that image, with a temporary writable layer for runtime changes.
To change any characteristic of the resulting container, you must return to the blueprint, modify it, build a new image from it, and then deploy the new container. You can keep the old one or get rid of it. In this sense, “modifiability” can only take place at the blueprint, not at the container, and that’s what immutability of the container means.
I hope this has been helpful!
Laz