ERROR: Couldn‘t connect to Docker daemon at http+docker://localhost - is it running?

created at 08-06-2021 views: 1

After centOS7.6 installs docker, execute it in the directory where the docker-compose.yml file is located:

docker-compose up -d

error message

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

solution

My solution is to start docker:

sudo systemctl start docker

If you can't solve it, you can try the following method

  1. Add the current user to the docker group: sudo gpasswd -a ${USER} docker
  2. Or sudo docker-compose up
Please log in to leave a comment.