I try to install docker but I cannot start docker daemons. I'm on Debian bullseye.
I was following this tutorial: https://docs.docker.com/desktop/install/debian/
However, when I type the command to start or enable the service I got the following error.
# sudo systemctl --user start docker-desktop
Failed to connect to bus: No file or directory of this type
# sudo systemctl --user enable docker-desktop
Failed to connect to bus: No file or directory of this type
I tried to search docker services with sudo service --status-all but I found none of them.
Does someone have an idea?
Related
When I run this command:
docker-compose pull --quiet --ignore-pull-failures
I get this error:
ERROR: Get "https://registry-1.docker.io/v2/": Bad Gateway
This was working fine before but it suddenly stopped working.
Is this docker issue ?
It happens sometimes!
Docker is not working at that time. You should restart your docker server. If you’re in windows and have a docker engine installed restart it manually by clicking on the docker icon on the bottom right then restart docker.
Or try the following command
service docker restart
docker pull...
If you are on linux based machine try the following command:
$ sudo systemctl daemon-reload #THIS IS RESCUE COMMAND…
$ sudo systemctl restart docker
$ sudo systemctl status docker
$ docker pull ...
Note : Try to log out and then login before executing the commands.
docker logout
docker login
you may also need to try connecting docker VM to direct internet connection without any firewall.
sudo docker ... works.
Maybe its firewall issue, but I am not sure
When I write docker-compose up on server, it gives me an error above.
I searched some solved this problem by writing sudo usermod -aG docker $USER
It gives me this error usermod: group 'docker' does not exist
and did export DOCKER_HOST=localhost:port
But it gave me again : Couldn't connect to Docker daemon at http://localhost:1774
Try to restart the docker daemon if it is not running. Add "sudo" in the below command, if it is needed.
service docker restart
I found the related issue here https://github.com/docker/compose/issues/4181
I have recently installed WSL2 and installed Ubuntu from Microsoft Store.When i run docker using
Sudo service docker start, i get below message
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
I followed steps as per this Answer and did below
sudo groupadd docker
sudo usermod -aG docker $(whoami)
But still cant start docker..when checking Docker logs, i could see below
CONNECTING" module=grpc Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can't initialize iptables table nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)
`
I have tried a lot of steps based on the error below
can't initialize iptables table nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3) `
But Starting Terminal as administrator worked.Even though you run
sudo service docker start
The Terminal should be launched as Admin
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
from https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269
I might be late but I faced similar problem and the solution was completely different.
I am posting here for someone if he/she gets similar issue.
Problem I Faced.
I setup wsl and docker in my new machine.
I can not run dockerd in wsl2. As TheGameiswar suggest I can start the dockerd if I run the terminal as Admin but I still can not run any image.
The root cause
By default the wsl is version 1 (wsl 1) and docker required wsl2.
Solution
Set the default wsl version to 2
wsl --set-default-version 2
set the installed distro to wsl2
wsl --set-version Ubuntu-20.04 2
There is a great guide here which gives some up to date instructions and some prerequisites on using WSL 2 and the new docker desktop.
we are getting this error while trying to run docker commands. E.g.:
$ docker image ls
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: connect: permission denied
So we followed the steps here but the problem remains. Then we saw this question where it is advised
You have to restart the docker daemon, otherwise it won't let members
of the docker group to control the docker daemon
but are having trouble restarting the service
$ sudo service docker restart
Failed to restart docker.service: Unit docker.service not found.
we are using
$ docker -v
Docker version 18.06.1-ce, build e68fc7a
on
$ uname -a
Linux jnj 4.15.0-1036-azure #38-Ubuntu SMP Fri Dec 7 02:47:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
the docker group has been successfully created and we are member of it
$ grep docker /etc/group
docker:x:1001:siddjain
Also we did log out and log back in. we are able to run docker commands with sudo. Also
$ sudo snap services
Service Startup Current Notes
docker.dockerd enabled active -
can anyone help us?
The solution was to restart docker daemon using snap (since that is how we installed docker)
siddjain#jnj:~$ sudo snap stop docker
Stopped.
siddjain#jnj:~$ snap start docker
error: access denied (try with sudo)
siddjain#jnj:~$ sudo snap start docker
Started.
After that we are able to run docker commands without having to sudo
siddjain#jnj:~$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
siddjain#jnj:~$
Our joy was shortlived as we immediately ran into another error after this one when we tried to run another container.
mkdir /var/lib/docker: read-only file system
To fix it we had to uninstall and reinstall docker again - this time from the official documentation as described here
I get following error when starting Docker daemon from command line:
Error starting daemon: error while opening volume store metadata database: timeout
OS is Linux.
Any pointer how can I resolve this?
(Google search didn't yield anything)
It depends on your exact Linux distro, and docker version.
See for instance issue 26022: it has the same error message on Fedora after a
yum -y install docker-engine-1.13.1-1.el7.centos
Try and follow again the full installation procedure for your exact distro.
After investigating a lot and trying many commands, this has worked for me:
*Do not use '&&' to make the most compact command or otherwise it will not work.
sudo rm /var/run/docker.pid
sudo systemctl stop docker.socket
sudo systemctl stop docker
systemctl start docker
systemctl enable docker
sudo systemctl start docker
If this error appears ( running $ docker [command] ):
Cannot connect to the Docker daemon at unix:///home/mg/.docker/desktop/docker.sock. Is the docker daemon running?
The first thing you should do is to have Docker Desktop installed on your pc, of which you can get here https://docs.docker.com/desktop/windows/wsl/
You should also enable wsl2, Just going through the documentation from the link above should be enough.
Also make sure Settings > General > Use the WSL 2 based engine... box is checked.
REFERENCE https://stackoverflow.com/a/72890783/21061651