After creating a toolbox and installing dockerinside, I get these errors. Could someone take a look to know what should I do?
Many thanks in advance,
Luis
⬢[luis@toolbox docker-teams-in-space]$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
⬢[luis@toolbox docker-teams-in-space]$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
⬢[luis@toolbox docker-teams-in-space]$ sudo systemctl start docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
⬢[luis@toolbox docker-teams-in-space]$
It’s a known limitation of toolbox. You cannot run systemctl services within a toolbox container.
If you search in toolbox issues on Github you might find some workarounds. I’ve never experimented with it.
Federico already made the point: toolbox has no dedicated systemd process, so this purpose is not intended (and likely to not work).
I suggest to use a virtual machine (e.g., qemu/libvirt with virt-manager: rpm-ostree install virt-manager libvirt qemu if you want to install/use that) instead of toolbox for your purpose. Then, use docker within the virtual machine.
You can try to see if podman can run the container (not in a toolbox). Podman is a backend for toolbox, and can be a drop-in replacement for some Docker images. For instance
Thank you very much, at last I will not use podman inside the toolbox, rotless containers or call docker on the host from the toolbox until there is a more stable solution by the distribution, so I opted by:
rpm-ostree install podman podman-docker
in the host, deploy the stack and all was fine and working.
I suggest to open a new thread for your new question.
A new thread with a title fitting the new question will be more likely to get attention from users with experience in silverblue partitioning and related structures.
mschwartau@toolbox:pts/0->/var/home/mschwartau (0)
> docker run --rm ubuntu echo "Hello"
Hello
Note that rootful docker will not work in toolbox: https://github.com/containers/toolbox/issues/430. But with rootless I haven’t had any problems (except the performance problems, see thread. But podman has the same performance problems.