Docker Community Forums

Share and learn in the Docker community.

When thinkpad notebook wake up from dormancy, the Docker Quickstart Terminal cannot connect to docker machine anymore, why?

(Lihongwei) #1

version: DockerToolbox-1.8.1b.exe, OS: Windows8.1, computer: thinkpad S3

  1. Wake up from dormancy, run ‘docker images’ in terminal, echo ‘An error occurred trying to connect: …’
  2. Restart the terminal, it says: Started machine may have new IP addresss. You may need to re-run the ‘docker-machine env’ command. Setting environment variables for machine default…’, then hangs on.
  3. Shut down vm in Oracle VM Virtualbox Manager, then restart vm, the terminal still cannot connect to docker deamon.
  4. Restart the computer, everything is OK.

How to resolve the after-dormancy connect problem?

(Jeff Anderson) #2

I would be curious to know if you have similar issues if you create a virtualbox machine manually with similar network config. If it’s reproducible in vbox on its own, then there might be a solution on that front.


(Lihongwei) #3
  1. I manually create a docker machine named my-default by run ‘docker-machine create my-default’, but met another problem when I run ‘docker-machine env --shell cmd my-default’ in Windows classic cmd terminal: it hangs up.
  2. when run eval “$(docker-machine env my-default)”, it echo ‘not found the cmd’. —it seems the tutorial not right.
  3. restart computer,first run ‘docker-machine regenerate-certs my-default’, then run ‘docker-machine env --shell cmd my-default’ in Windows classic cmd terminal again, it work!
  4. then set env variables:
    ​set DOCKER_HOST=tcp://
    ​set DOCKER_CERT_PATH=C:\Users\automic.docker\machine\machines\my-default
    ​set DOCKER_MACHINE_NAME=my-default
  5. run ‘docker run hello-world’, it is OK.
  6. let computer enter dormancy. login computer again, run ‘docker run hello-world’ in cmd terminal, it says 'An error occurred trying to connect: … ’

it seems the after-dormancy connect problem still exist for the virtualbox machine created manually.

(Jeff Anderson) #4

It sounds like you are still creating the virtual machine through the docker-machine CLI. I’m curious if you open virtualbox and manually create a VM there if you have similar problems.

As for the docker-machine created hosts, are you able to docker-machine ssh into them?