Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4484

Running docker daemon in i3

$
0
0

I recently switched from GNOME to i3 on my Ubuntu 22.04. I am having trouble running docker as a non-root user. If I run a docker command as-is, it'll give me a "Cannot connect error".

$> docker container lsCannot connect to the Docker daemon at unix:///home/adarsh/.docker/desktop/docker.sock. Is the docker daemon running?

The interesting thing is that in GNOME if I go and launch Docker Desktop from the applications, then I can use the docker commands without prepending sudo. But in i3, selecting the docker-credential-desktop from rofi does not launch anything, and I cannot run any docker commands as a non-root user.

If I try using systemctl to start docker-desktop as given in Installation for Arch Linux, then it also fails

$> sudo systemctl start docker-desktopFailed to start docker-desktop.service: Unit docker-desktop.service not found.

Just starting the docker service by sudo service docker start or sudo systemctl start docker works, but the problem persists.

Then I tried to start the daemon with dockerd as given in Starting the docker daemon, but that also failed.

$> sudo dockerdINFO[2024-02-07T15:45:41.739733781+05:30] Starting up                                  failed to start daemon, ensure docker is not running or delete /var/run/docker.pid: process with PID 11345 is still running$> sudo rm /var/run/docker.pid$> sudo dockerdINFO[2024-02-07T15:46:07.461907886+05:30] Starting up                                  failed to start daemon: error while opening volume store metadata database (/var/lib/docker/volumes/metadata.db): timeout

I have also followed all the instructions for Post-installation in Linux but it is still not running.

Note that with sudo it will run fine, but I want to run docker as non-root. It would be anyone could help me or point me in the right direction.


Viewing all articles
Browse latest Browse all 4484

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>