I recently tried to remove Docker and Docker Desktop on Ubuntu 22.04. Now after installing Docker using this commands:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce
I can run Docker and install containers, but I am getting the following error, if I use “docker ps” command.
Cannot connect to the Docker daemon at unix:///home/mark/.docker/desktop/docker.sock. Is the docker daemon running?
Here is the information returned from the “sudo systemctl status docker” command.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-05-19 22:46:26 EDT; 2h 26min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 1481868 (dockerd)
Tasks: 15
Memory: 136.8M
CPU: 5.300s
CGroup: /system.slice/docker.service
└─1481868 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
May 19 22:46:26 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-19T22:46:26.808241763-04:00" level=info msg="Docker daemon" commit=1331b8c graphdriver=overlay2 version=24.0.0
May 19 22:46:26 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-19T22:46:26.808325563-04:00" level=info msg="Daemon has completed initialization"
May 19 22:46:26 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-19T22:46:26.843676875-04:00" level=info msg="API listen on /run/docker.sock"
May 19 22:46:26 mark-OptiPlex-3020 systemd[1]: Started Docker Application Container Engine.
May 20 00:47:20 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:47:20.331095626-04:00" level=warning msg="Security options with `:` as a separator are deprecated and will be completely unsupported in 1>
May 20 00:47:20 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:47:20.935949300-04:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameser>
May 20 00:47:20 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:47:20.935974284-04:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 20>
May 20 00:47:20 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:47:20.983188223-04:00" level=warning msg="Security options with `:` as a separator are deprecated and will be completely unsupported in 1>
May 20 00:57:22 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:57:22.211918410-04:00" level=info msg="ignoring event" container=fe17c7c9785f3b4be1d9e1ca5ec32b4ee9940b802ebea604b93c244f4b67ef1d module=>
May 20 00:57:22 mark-OptiPlex-3020 dockerd[1481868]: time="2023-05-20T00:57:22.221576612-04:00" level=warning msg="ShouldRestart failed, container will not be restarted" container=fe17c7c9785f3b4be1d9e1ca5ec32b>
docker info returns
Client: Docker Engine - Community
Version: 24.0.0
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.17.3
Path: /usr/libexec/docker/cli-plugins/docker-compose
Any idea where to start looking for the problem to this?