Hi,
I am new to fedora silverblue. I have encountered some issues when setting up my dev environment when installing docker on my host.
First I am setting up the docker repositories:
Then I continued with docker desktop installation according to the official guide
I downloaded the latest docker rpm package and run “rpm-ostree install ./docker-desktop-4.30.0-x86_64.rpm”.
First it failed because it could not locate “docker-ce-cli”. After some looking around it looks like the docker repo was not added correctly? I have no idea why. Since I really don’t know much about how fedora and fedora silverblue works, I consulted chat-gpt and added previously missing “/etc/yum.repos.d/docker-ce.repo” with the following configuration:
After that, clearing some cache and reboot (just to be sure) the Docker repo was finally enabled and docker-ce-cli was found.
So I run “rpm-ostree install ./docker-desktop-4.30.0-x86_64.rpm” again but this time it fails with:
Checking out tree 1a1bee9… done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree copr:copr.fedorainfracloud.org:phracek:PyCharm google-chrome rpmfusion-nonfree-nvidia-driver rpmfusion-nonfree-steam docker-ce-stable updates-archive
Importing rpm-md… done
…
Resolving dependencies… done
Will download: 140 packages (55.7 MB)
Downloading from ‘fedora’… done
Downloading from ‘updates’… done
Importing packages… done
Checking out packages… done
error: Checkout docker-desktop-4.30.0-149282.x86_64: opendir(local): No such file or directory
And here I am lost. Not really sure why this is happening or how should I fix it.
Does anyone know why the error happens?
Also is this correct way to install docker on the host machine? Or is it recommended to just use it in toolboxes? I wanted to share the docker installation between toolboxes, because I work with docker often so I chose to install it on host.
Then you need modify the /etc/yum.repos.d/docker-ce.repo file to point the gpgkey field to the /etc/pki/rpm-gpg/docker-ce.gpg in each package. There are a couple of packages in the repo, so there will be some hand work to do. Here is example for docker-ce-nightly:
Sorry, I selected the wrong person in the reply. The Podman vs. Docker discussion is another discussion. From the Fedora Silverblue perspective, Podman comes pre-installed with the system, which is an advantage.
You will most likely need to reboot first and then sudo systemctl enable --now docker.service. Also, to allow unprivileged users to run Docker commands, you will need to add your user to the docker group, which grants root-level privileges to the user.
Personally I have to because in our company the whole app development is based on docker and docker-compose. I know I know podman also has the same commands. But they are differences here and there that make it unfeasible for me to use it. Simply aliasing podman to docker is not solution for me. I have tried that and whole lot of things in our scripts crumbled. And I can’t invest the time to rewriting everything and making sure it works as it did before.
Thanks everyone for help.
I had some other issues with silverblue - not understanding the mindset and workflow enough I guess.
So I decided to first try “standard” fedora experience with the workstation edition and maybe try silverblue later.
On workstation I managed to install docker fine.
I think it’s a matter of ideology. We would all like to use Podman, but the truth is that the entire corporate world is deeply entrenched in Docker. Even open source projects like my own are still using Docker, and cutting over to Podman would cost me a lot of time. Time that I’d much rather use building features for my users.
Correct, but there workarounds with export TESTCONTAINERS_RYUK_DISABLED=true
To use “Docker” without needing docker on the host, I start the Podman socket, and set the DOCKER_HOST to point to the Podman socket. Then in a toolbox, I install Docker, which actually uses Podman on the host.
systemctl --user enable --now podman.socket
# In toolbox, with `docker` installed
export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" # Consider adding to ~/.bashrc
docker run hello-world
No matter our ideologies, there are differences between Docker and Podman. Docker supports more extensive build caching with e.g. --from=local, and Podman fails parsing various Compose directives, which Docker handles without issue (e.g. extends on services withdepends_on).
Also, the Docker Client TUI is prettier and nicer (purty colours )
Thank you for your solution. It finally worked for me here.
I got stuck with the definite addition to the docker group to the user, but this finally fixed.
There is a small error in your command tho:
grep -E "^$GROUP:" /usr/lib/group | sudo tee -a /etc/group && sudo usermod -aG "$GROUP" "$USER"