In my case Docker CE configured on RHEL 8 & 9 version but frequently getting this error.
I have checked docker context show it is showing “default”
docker context ls showing like below
NAME DESCRIPTION DOCKER ENDPOINT ERROR
default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock
I have identified one more thing in my case I could see another socket is there under /var/run/containerd/containerd.sock but am unable to use this one
docker context use /var/run/containerd/containerd.sock getting below
context name "/var/run/containerd/containerd.sock" is invalid, names are validated against regexp "^[a-zA-Z0-9][a-zA-Z0-9_.+-]+$"
Can anyone please check and provide me permenant fix for this issue.
As of now I can provide workaround to fix the issue using following commands
nmcli device set docker0 managed no
firewall-cmd --zone=public --remove-interface=docker0 --permanent
firewall-cmd --permanent --zone=docker --add-interface=docker0
firewall-cmd --reload
firewall-cmd --zone=docker --list-interfaces
systemctl restart docker
systemctl status docker.service
I am not sure whether it is related to socket or NetworkManager.
I moved your post to its own topic as the original issue was about Docker Desktop.
I also formatted the post. Please, use the code block button </> or markdown code blocks to format code, terminal output, error and logs.
Regarding your docker context changing attempt: I recommend checking the docker context use --help output. You cannot use a socket as a context. A socket can be a parameter of a context that you need to create. More information is in the output of docker context create --help
But what you tried was a containerd socket, not a Docker socket. Docker uses containerd to run containers but you need to communicate with the Docker Daemon, not Containerd.
IF you get the error message that you canot connect to the daemon, it is probably not running and you can try checking the status
Thanks for your swift response. Whenever they reporting the issue that time when I check the service status not active state.
I really don’t know how can I fix this issue since Docker CE not supported by Redhat vendor from RHEL 8 onwords.
I am looking forward from you give some insight on this. Please let me know if you need any information from my end.
I’m not sure what I can say except asking for more details. We don’t know whether it ever worked. You wrote you “frequently” got the error, which indicates it works for some time and then stops. Can you confirm it?
How did you install Docker on that machine? Or those machines as you mentioned RHEL 8 and 9.
Here is the officially supported method?
The systemctl status docker command also shares a some lines of log messages, but you can check detailed logs by running
journalctl -e -u docker
If the service restarted too many times, you will need to scroll up in the logs or use the --since and --lines parameter to show more logs or older logs. You can restart the service to generate the original errors again.
Yes it works some time and then stops. We installed docker using repository. Yes those machines are RHEL 8 & 9.
Same link only Application CI/CD pipeline followed for the installation,
systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: disabled)
Active: active (running) since Wed 2026-05-13 06:53:01 CDT; 6 days ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 31158 (dockerd)
Tasks: 11
Memory: 112.3M (peak: 2.0G)
CPU: 5min 54.637s
CGroup: /system.slice/docker.service
└─31158 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock