It is in Russian but I believe google translate should work in your browser. I described my experience in an article Running systemd in docker container. P.s I spent quite a while learning how systemd behaves and managed to get it working on number of operating system images. For information about removing systemd from other Linux distributions (namely Debian and deb/apt-get based ones like Ubuntu and Mint) you can visit the Without systemd wiki. Otherwise ntpd will fail with permission deny as nobody wants a container to set system time by default. Other Linux distros: Escape from systemd Here we focus on removing systemd from Arch Linux and derivatives: Manjaro, ArchBang, Antergos etc. If we are talking about running particular service there like ntpd from your example you will need to add -cap-add=SYS_TIME mount type=tmpfs,destination=/run/lock \Īrchlinux/base -log-level=info -unit=sysinit.target mount type=bind,source=/sys/fs/fuse,target=/sys/fs/fuse \ mount type=bind,source=/sys/fs/cgroup,target=/sys/fs/cgroup \ The resulting command line is docker run \ as the last bit you need to specify sysinit.target as default unit to boot instead of multi-user.target or whatever, as you really do not want to start graphical things inside a container.systemd thinks that using tmpfs everywhere is a good approach, but running unprivileged makes it impossible for it to mount tmpfs where ever it wants, so pre-mount tmpfs to /tmp, /run and /run/lock.bind mounting /sys/fs/fuse is not required but helps to avoid issues with fuse-dependent software.systemd actively uses cgroups, so bind mount /sys/fs/cgroup file system from a host. provide a container= variable, so systemd won't try to do number of things it usually does booting a hardware machine.Then, to run systemd totally unprivileged, number of things should be done: And as you said, docker seems like the best approach here as it is much easier to bring up and down a container rather than a virtual machine.įirst of all base/archlinux image is deprecated - you should use archlinux/base instead. I ran into the same problem testing my Ansible playbooks which require systemd.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |