Docker - Cannot connect to the Docker daemon

Start docker, and pull bkimminich/juice-shop. Console says

$ docker pull bkimminich/juice-shop
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

If docker restarts, it pops up an error windows. Message as follow:

Failed to retrieve settings values.

Cannot open socket /Users/someone/Library/Containers/com.docker.docker/Data/s20

How to solve the problem ?

Please try it in your way, maybe you have some important data here.

$ ls -al ~/Library/Containers/com.docker.docker
total 0
drwxr-xr-x    3 someone  staff   102 Jul 28 09:56 .
drwx------  174 someone  staff  5916 Dec 15 01:41 ..
drwxr-xr-x   20 someone  staff   680 Dec 27 03:50 Data
$ ls -al ~/Library/Containers/com.docker.docker/Data
total 24
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 *00000002.00000202
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 *00000002.000005f4
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 *00000003.000005f5
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 *00000003.00000948
drwxr-xr-x  20 someone  staff  680 Dec 27 03:50 .
drwxr-xr-x   3 someone  staff  102 Jul 28 09:56 ..
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 @connect
drwxr-xr-x  12 someone  staff  408 Dec 25 22:48 com.docker.driver.amd64-linux
drwxr-xr-x   3 someone  staff  102 Jul 28 09:57 database
lrwxr-xr-x   1 someone  staff   18 Dec 25 22:48 guest.000005f5 -> *00000003.000005f5
lrwxr-xr-x   1 someone  staff   18 Dec 25 22:48 guest.00000948 -> *00000003.00000948
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s30
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s31
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s40
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s50
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s51
srwxr-xr-x   1 someone  staff    0 Dec 25 22:48 s60
-rw-r--r--   1 someone  staff    0 Jul 28 09:57 task.lock
drwxr-xr-x   3 someone  staff  102 Dec 25 22:48 tasks
-rw-r--r--   1 someone  staff   37 Dec 25 22:53 user.id

$ rm -rf ~/Library/Containers/com.docker.docker/Data

References

  1. https://forums.docker.com/t/docker-for-mac-cannot-start/17045/6
  2. http://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon

你可能感兴趣的:(Docker)