docker images info d command error reporting solution

  • 2020-05-24 06:32:58
  • OfStack

1. Identify problems

Regardless of the input of the command, there are:


FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 

2. Solutions

And mistakes like that, even docker version Orders are wrong, the building Lord began to look for ah find a lot of things, the results found that no 1 can work, finally the building Lord use such a command:


# vim /etc/default/docker 

Add the following to the file:


DOCKER_OPTS="-H unix:///var/run/docker.sock -H 0.0.0.0:5555" 

# service docker restart 

That's it... I don't know how. It's amazing.

The building Lord quickly used 1


syx@syx-VB:~$ docker version 
Client version: 1.6.2 
Client API version: 1.18 
Go version (client): go1.3.3 
Git commit (client): 7c8fca2 
OS/Arch (client): linux/amd64 
Server version: 1.6.2 
Server API version: 1.18 
Go version (server): go1.3.3 
Git commit (server): 7c8fca2 
OS/Arch (server): linux/amd64 

Good magic, finally can, the building owner quickly upgrade docker to the latest version.


$ sudo add-apt-repository ppa:docker-maint/testing 
$ sudo apt-get update 
$ sudo apt-get install docker.io 

The building Lord went so 1 time, then can not go again building Lord began to find the reason, this building Lord asked to ask to say goodbye, others said to install 1 devicemapper under ubuntu

The order used by the landlord is as follows:


root@syx-VB:~# apt-get install -y libdevmapper-dev 

Still not.


root@syx-VB:~# service docker restart  
root@syx-VB:~# docker version  
root@syx-VB:~# docker version 
Client version: 1.7.0-dev 
Client API version: 1.19 
Go version (client): go1.4.2 
Git commit (client): 9234460 
OS/Arch (client): linux/amd64 
FATA[0000] Get http:///var/run/docker.sock/v1.19/version: read unix /var/run/docker.sock: connection reset by peer. Are you trying to connect to a TLS-enabled daemon without TLS? 

English is not good, do not understand what it means, then ask.

Someone told the landlord to use it docker -d Take a look at:


root@syx-VB:~# docker -d 
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
FATA[0000] Error starting daemon: error initializing graphdriver: "/var/lib/docker" contains other graphdrivers: devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>) 

Do not understand, then ask god!!
The great spirit said to clear the devicemapper under /var/lib/docker.


root@syx-VB:/var/lib/docker# ls 
aufs containers devicemapper graph init linkgraph.db repositories-aufs repositories-devicemapper tmp trust volumes 

This directory actually exists, so use:


# vim /etc/default/docker 
0

And then:


# vim /etc/default/docker 
1

How still not line!!

At this time, the owner of the building restarted the docker service for 1 time.


# vim /etc/default/docker 
2

conclusion

Well, finally solved, the above is the entire content of this article, I hope the content of this article to your study or work can be helpful, if you have questions you can leave a message to communicate.


Related articles: