1

I am using windows 7 machine.I installed docker toolbox having version 19.03.5.When I try to fetch docker machine ip am getting error

C:\Windows\system32>docker-machine ip
Error getting IP address: Host is not running

So when I check the docker status docker-machine status default it shows stopped.I tried to start using docker-machine start default getting error

C:\Windows\system32>docker-machine start default
Starting "default"...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Somet
imes, such confirmation window is minimized in the taskbar.
Error setting up host only network on machine start: C:\Program Files\Oracle\Vir
tualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM --nic
promisc2 deny --hostonlyadapter2 VirtualBox Host-Only Ethernet Adapter #2 --cabl
econnected2 on failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended in
fo not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at lin
e 529 of file VBoxManageModifyVM.cpp

I am able to run docker commands.

When I run the command docker-machine ip on docker Quick start terminal it showing ip(192.168.99.100).When I hit the ip getting unreachable.I able am to run the docker image also when I try to access the resources present in that getting unreachable.

Image: enter image description here

1 Answer 1

2

It looks like some network issue with Virtual Box for default VM used by Docker.

Try following steps

  • Open virtual box, stop default and remove it
  • Right-click Docker Quickstart, select run as administrator

It will setup default VM again in Virtual Box

Refer this for more detail

Note: You will lose all existing Docker Images if any.

Edit 1:

As per screenshot attached. Port needs to be exposed in order to make it accessible from Host machine.

docker run -p 9999:8082 nithin4325/demo

You can access it on 192.168.99.100:9999

Assuming 8082 is your spring Application port configured and you want to access it to 9999 port on the host.

Assuming 9999 port is available on the host (no application is running on that port) else might throw Port already in use error

7
  • I tried what you said I am able to get ip now in dokcer quickstart terminal,command prompt but not in git bash command prompt.I tried to access docker machine ip and also resources of a running image in chrome getting not reachable.
    – nithin
    Jan 22, 2020 at 7:00
  • When you run docker through docker quickstart terminal. docker will be available only in that Terminal. It's not available globally So can't access from git bash . That will work for Docker for Windows
    – MyTwoCents
    Jan 22, 2020 at 7:12
  • But yesterday I am able to access from git bash also.Now eventhough I am able to get ip from quickstart start terminal but not able access docker machine ip and also resources of a running image in chrome getting not reachable
    – nithin
    Jan 22, 2020 at 7:20
  • Its better you go one step at a time. First, check if your docker quickstart terminal starts Docker successfully as i suspect just by getting ip doesn't mean docker is running. . you can run "docker run hello-world" to check if its working fine. If it doesn't work you need to resolve this issue. regarding git bash As you said it was working yesterday in git bash it should work fine now.
    – MyTwoCents
    Jan 22, 2020 at 15:54
  • I am able to run docker run hello-world.I got message also as Hello from Docker! This message shows that your installation appears to be working correctly.
    – nithin
    Jan 22, 2020 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.