Open tschwaller opened 5 years ago
Adding some background, and hints for how to add this.
Prior to the custom ISO work we did use systemd to initialize /dev and then switchroot into the container filesystem with tether as pid1. With the custom ISO work we also had to support sysv init systems (no systemd present) so we now have the system-init script.
I cannot give a solid estimate for supporting a systemd based container because we’ve never gone through it in depth, but:
Things to consider:
I do think this would be extremely useful work, and is a necessary pre-req to supporting kubelet running in a cVM if you want to be able to support Kubernetes-cluster-in-a-VCH, which I think is also extremely useful work.
thanks for input. Will also talk to a few customers about it.
User Statement As a user I would like to deploy containers using
systemd
inside the container, since this greatly simplifies writing Dockerfiles using already packaged software. With VIC-1.5 it is possible to use alternate Linux kernels (e.g. from CentOS), which makes this feature even more interesting since it would enable users to run e.g. the full CentOS stack in Container VMs. This is the reason for this feature request, which has beed discussed in the past, but never got implemented.Details The CentOS systemd Container should run with VIC. The corresponding Dockerfile looks like this
and shows how you can avoid re-inventing the wheel. It would also allow to replace OVA deployments completely with VIC based Container VMs. The command
docker run --privileged --name httpd -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 -d httpd
should be replaceable with the following command in a VIC context
docker run --name httpd -p 80:80 -d httpd
i.e. you do not need privileged mode or mount hacks.