docker操作常见错误

错误1:

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.

 

Is your docker engine running ?

$ sudo service docker status

 

Is your user in docker user group ?

You need to use sudo if your user is not in docker user group. Even you used sudo, you may encounter other permission issues between host and container filesystems when you mounted volume to containers. You can add your user to docker user group with the following command.

 

$ sudo usermod -aG docker ${USER}

 

You should logout and login the host again, after called the command.

 

 

 

猜你喜欢

转载自tzhennan.iteye.com/blog/2410414