Ubuntu16.04 executes docker in the directory where the docker-compose. Yml file is located after installing docker:
jing@ubuntu:/tmp/docker$ docker-compose up -d
Error:
ERROR: Couldn’t connect to Docker Daemon at HTTP + Docker :// localunixSock-is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Online all kinds of way seven eight bad solution, really ridicule.
What is correct is to add the current user to the Docker group
jing@ubuntu:/tmp/docker$ sudo gpasswd -a ${USER} docker
Then exit the current user and switch to, say, root and then switch to Jing again. Then execute Docker-Compose up-D and it will be ok.
jing@ubuntu:/tmp/docker$ sudo su
root@ubuntu:/tmp/docker$ su jing
jing@ubuntu:/tmp/docker$ docker-compose up -d
Read More:
- [Solved] Docker Error: got permission denied while trying to connect to the docker daemon socket at…
- Docker Open Error: Warning: docker.service changed on disk. Run ‘systemctl daemon-reload‘ to reload unit
- [Solved] error during connect: This error may indicate that the docker daemon is not running
- Docker Error response from daemon: Get https://registry-1.docker.io/v2/portainer/portainer/…
- Docker Create or Start Nginx Error: docker: Error response from daemon: driver failed programming external connectivity
- [Solved] Docker failed to start daemon: error initializing graphdriver: driver not supported
- How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon
- Docker Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not yet valid
- [Solved] Docker Error: Failed to connect to bus: Host is down
- [Solved] docker Error response from daemon OCI runtime create failed container_linux.go380
- [environment] docker: error response from daemon: OCI runtime
- [Solved] CentOS build a docker error: job for docker.service failed….
- [Solved] docker: Error response from daemon: driver failed programming external connectivity on endpoint mysql-test …
- [Solved] Docker Error: Error response from daemon: driver failed programming external connectivity on endpoint
- [Solved] Docker: Error response from daemon: driver failed programming external connectivity on endpoint mysq
- How to Solve Docker failed to initialize Error
- [Solved] docker Error: bridge docker0 failed: exchange full
- MAC: How to modify the docker container error [screen is terminating]
- Docker: How to Enter the Closed Container and View the Logging
- [Solved] Docker Start Error: iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 10241