I’m currently studying Ansible with a Udemy course (“Dive Into Ansible - Beginner to Expert in Ansible - DevOps”) that works with Docker instances; I installed Docker CE and Docker Compose plugin towards that end.
Upon spinning up the Linux images with docker compose up, my networking (wifi), Bluetooth, and pulseaudio capabilities went offline on my Debian 12 install. Wifi returned upon shutting down the instances, and I was able to restart the audio via systemctl - however, I had to reboot the system to regain Bluetooth capabilities.
System is a Lenovo IdeaPad Slim 5,
Kernel is 6.12.12+bpo-amd64
RAM: 16GB
CPU cores: 12 - 13th Gen Intel i7
I couldn’t find anything in the logs - and checking online (as well as Ansible and Docker forums) showed no information on how to resolve the issue. Has anyone been able to get Docker and Docker Compose to successfully work with Debian 12?
Well, it depends on what images and what security settings you used. If you give the containers full access to host (which is not the default), then they could mess up the host system.
As already said, it depends on what image you are using and how you start the container, but if you need a guess (the best we can do without more info) running Systemd in a container can break the host if done wrong. Normally it shouldn’t be done at all of course.
I have been trying to get that to work - currently I am trying to change the Docker storage location of the resources, in order to save space on /var/.
And indeed, the images seem to have systemd and the containers are started in privileged mode. So I suspect that is the reason. You could contact the author on GitHub, but there is already an open issue in the repo
In my experience, running Systemd in containers depends on the host too. At least I couldn’t run it on every host I had.
Hi there, author of the images and course here. Sorry you’re having these issues and to reassure you somewhat, the privileged aspect isn’t something I desire but, is at present a requirement for systemd based container images with Docker. If you take the privileges away, they won’t run.
Why exactly, this happens… I don’t know, it’s something in the systemd startup that then, interferes with the source host.
it’s fine on Docker Desktop with its hidden vm isolation but is a problem on Docker Engine.
Over the years, I’ve tried to troubleshoot this. I can’t recreate the problem myself and when I do attempt troubleshoot it, the person loses interest or moves on.
I’m very open, to deep diving, identifying the core issue and resolving this, if you’re open.
I can offer my help and my old guide where I managed to run Systemd without privileged container. I can also run test in some environments like VM on macOS (arm64) and Windows, WSL2 on Windows or Docker Desktop on Mac and Windows. Not on a physical Linux machine at the moment. Hopefully we can solve it together, but I will have to refresh my memory and knowledge on systemd in containers
To my knowledge, I am not running Systemd in a container, as I haven’t spun one a container up successfully; the course gives six Linux container images to run, which takes up a the remainder of space on my /var partition. Currently, I am researching on how to to change the Docker Storage location, as I have over 60GB free on my /home partition - but the online documentation doesn’t touch upon the issues of installing Docker CE and Docker Compose (the latter seems to remove features in the Docker CE install that seem to mess with the functionality).
If anyone has some really current documentation on how to do this, I would appreciate that.
Systemd is in the images. Even if you could not run the containers sucessfully, the containers started and when systemd started in the container, that affected your host. It is a known issue with Systemd. Running systemd in Docker containers is tricky, but if you want to test Ansible without creating huge virtual machines, that is a way to reduce required storage size s well as CPU and memory requirements. Otherwise you could not test Ansible tasks that would install packages that require systemd.
When the containerd image store is enabled (as it is in newly installed Dockr versions), the bigger data is not in the docker data root, so the documentation also explains how you can configure containerd.
I’m not sure what you mean, but it looks like a Docker installation issue we could discuss further in a new topic. Docker Compose is just a plugin to use as a client which will not remove features. Maybe you mean not every parameter is supported in compose, but almost all are. We are happy to help you with that as well, but I recommend keeping this topic for the Dive into Ansible guide issue.