This error may inadvertently room appeared, when development is indifferent, afraid encounter on-line environment.
This blog with an environment that is built docker, and occasionally there are so few blog inaccessible, most up
or build
when a problem / laughing and crying.
The following is a detailed error content, I guess you should be a dime like me:
$ docker-compose up ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
This leads to the problem of the reasons it is more than , so the solutions listed.
1 docker service did not start, it started
$ sudo systemctl start docker // 或者 sudo service docker start $ docker-compose up
2 docker service starts, but some caches affected
Then restart
$ sudo systemctl restart docker // 或者 sudo service docker restart $ docker-compose up
3 the current user is not docker
the user group
Then to add to their docker
user group
$ sudo gpasswd -a ${USER} docker $ docker-compose up
Added to the docker
user group to re-login shell up
.
4 may be effective with sudo
$ sudo docker-compose up
5 docker-compose version is too old
It is an updated version
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose $ sudo chmod +x /usr/local/bin/docker-compose $ docker-compose up
Click here to see docker-compose the official installation tutorial (may need a ladder).
6 reboot system now
$ sudo reboot $ docker-compose up
Several such programs, there is always a right for you, hey ~ ~ ~
Original Address: https://www.awaimai.com/2587.html#2_docker