Cannot connect to the Docker daemon. Is the docker daemon running on this host?

You need to add your current user to docker group like following:

sudo usermod -aG docker <your username>

Also, you can use USER environment variable like:

sudo usermod -aG docker $USER

Then restart the system. As the docker documentation says:

The docker daemon binds to a Unix socket instead of a TCP port. By default that
Unix socket is owned by the user root and other users can access it
with sudo. For this reason, docker daemon always runs as the root
user.

To avoid having to use sudo when you use the docker command, create a
Unix group called docker and add users to it. When the docker daemon
starts, it makes the ownership of the Unix socket read/writable by the
docker group.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)