Currently I am using Silverblue 30 and all my development tools are layered (I am aware it is not the best thing to do).
The only thing holding me back to use fedora-toolbox for development is running docker inside toolbox.
So, is there a way to run docker/moby-engine inside the fedora-toolbox?
Update:
I moved my dev-env in toolbox and I am using moby-engine as layered.
Another question is there any way to run a program directly from host inside toolbox? For example, rather than doing toolbox enter and then vim , is there anything like toolbox exec vim ?
I don’t know if this will work for moby-engine, but it is possible to run commands on the host via flatpak-spawn --host. I’ve not used it myself, but there are other threads on this forum using this approach.
Yes flatpak-spawn --host works for spawning a host process, but what I want is running container process from host without doing toolbox enter everytime.
Yes I am aware about podman and I know that toolbox uses it to create a container but toolbox enter also adds some ENV variables and other stuff when doing toolbox enter.
This happens because toolbox adds many other arguments when doing toolbox enter to the podman exec command, this is what I got by doing a simple ps fax
Does anyone know, if it’s possible to run the docker service inside the toolbox?
I already read that you can use flatpak-spawn --host docker or doing sudo setfacl -m "u:myuser:rw-" /var/run/docker.sock in order to have docker.sock access in the container at /run/host/run/docker.sock.
However, some apps I’m working with really require a running docker service inside its host and I’m not willing to install such services in my Silverblue host system and calling them via flatpak-spawn --host.
I came across this particular post when researching how to run podman from inside a toolbox container. My quick hack was to add a shell script at /usr/bin/podmaninside the toolbox, with the following:
#!/bin/bash
flatpak-spawn --host podman $@
This allowed me to use podman from within a container. You could do the same with docker by copying/linking the script from/to /usr/bin/podman, if you were happy with using podman as a drop-in replacement for docker.
For this, you can use the command toolbox run [--container NAME] [COMMAND]. Check out man toolbox-run for the details.