Installed SilverBlue 40 two weeks ago and since then I am strugling configuring a development enviroment for Java with Podman or Docker.
At first, tried to install VSCode as Flatpak. That didn’t work.
Tried all suggestions I could find, and it seemed that most issues are caused due to Flatpak restrictions.
Uninstalled VSCode Flatpack, and installed it using rpm-ostree.
Did the same with IntelliJ Ultimate.
Installed, Docker-CE with rpm-ostree.
Now, in IntellJ I can clone that repo in a Podman container, and I can see it appearing in Podman Desktop.
With Docker, it almost works to the point that project project opens, but it seems that the git repo is not cloning successfuly (tried twice).
VSCode just refuses to work
I am choosing to “clone repo in container volume”, and selecting above repo.
Getting permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/volumes”: dial unix /var/run/docker.sock: connect: permission denied
It happens both with podman and docker in my settings.json.
Is there some way to get the user name used to access that socket?
I have no experience with using docker for dev containers, so no idea what is going on there. But I am using podman with flatpak vscode and intellij so I know that one should work.
Have you enabled the podman socket?
# Enable the podman socket
systemctl --user start podman.socket
# Automatically start after reboot
systemctl --user enable podman.socket
The user that started the service should have access to the socket. See this post on how to use the socket in the intellij flatpak. From my experience(2023) the dev container support in intellij is not that good yet, but it should be usable.
Dev containers with the flatpak vscode don’t seem possible because it tries to mount a flatpak directory into the container (which obviously breaks). Manually attaching to a container should work though, the only difference would be that the dev container isn’t setup using the usual YAML config. It isn’t that well written, but this older post of mine describes how to do that. See the “flatpak with toolbox integration” part.
Yes. DevContainers could be a bit tricky to get it working with vscode.
I have been through that pain, and dedicated two weeks to make it work consistently in Silverblue.
My first advice would be to focus first on making Docker, vscode, and the extension DevContainers to work well all together.
From the error you are reporting it seems two causes: the docker service is not enabled or been started, and the user hasn’t been added to the docker group. The unique nature of being an atomic OS, for some reason Silverblue does not automatically create the docker group; you have to do it manually by extracting the docker gid from /usr/lib, and then write that in /etc/group. I found the fix somewhere in this forum. I am not at my desk now.
But definitely Docker works very well with DevContainers and vscode.
Once you get your workflow repeatable with Docker, then move to attack the Podman problem.
Switched to this one https://projectbluefin.io/
There are two versions, one called bluefin-dx, with development tools included.
At first tried with rpm-ostree, almost got it working, but then discovered that gnome session is crashing repeatedly and decided to install it from iso.
It comes with docker, vscode and intellij preinstalled – meanwhile, it seems that it solved these issues.