-
Suppose we have a machine on which a fresh full Ubuntu 22.04 server or desktop is installed from ISO image file download from Ubuntu official website. Is there any chance we can use the existing whole full Ubuntu installation as a bootstrap agent, or can we make a Singularity container by duplicating the existing whole full Ubuntu installation and then use it as a bootstrap agent? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is technically possible (creating a container filesystem image of a full system), but the result is not likely not be practical. You could make an image of your entire host system using e.g. Because containers do not boot a kernel, and cannot start an init system (systemd) without workarounds, a large amount of configuration and services that are applied / run on the host system will not be applied / run in a container. Software installed in the host system is likely to depend on configuration / services that are then not correct or running in the container environment. Singularity starts containers, by default, in a way where environment variables and mounts are propogated into a container. This is also likely to conflict with the expectations of a 'full system' container. If you want a clone of a host system, it would be better to use a Virtual Machine approach instead of containers. As is discussed in the documentation, Singularity intends to allow packaging of applications / pieces of software into a container, not entire systems. We don't intend to document, or introduce any features related to containerizing a full system. |
Beta Was this translation helpful? Give feedback.
-
I would like to confirm, if we use
as header, is the base operating system of guest Ubuntu the Minimal Ubuntu described here? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the clarification. |
Beta Was this translation helpful? Give feedback.
This is technically possible (creating a container filesystem image of a full system), but the result is not likely not be practical. You could make an image of your entire host system using e.g.
mksquashfs
and then buildBootstrap: localimage
from that image, but the resulting container is very unlikely to work as you expect.Because containers do not boot a kernel, and cannot start an init system (systemd) without workarounds, a large amount of configuration and services that are applied / run on the host system will not be applied / run in a container. Software installed in the host system is likely to depend on configuration / services that are then not correct or running in the conta…