Docker主机未运行 [英] Docker host is not running

查看:113
本文介绍了Docker主机未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows 7机器。我安装了版本为19.03.5的docker工具箱。当我尝试获取docker机器ip时出错

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

因此,当我检查docker status docker-machine status default 时,它显示已停止。我试图开始使用 docker-machine start default 出现错误

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

我能够运行docker命令。

I am able to run docker commands.

当我运行命令docker时docker快速启动终端上的-machine ip,它显示ip(192.168.99.100)。当我击中IP变得无法访问时,当我尝试访问该无法访问的资源时,我也可以运行Docker映像。

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.

图片:

推荐答案

它看起来像是一些网络Docker使用的默认 VM的Virtual Box出现问题。

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

尝试以下步骤


  • 打开虚拟框,停止默认并删除它

  • 右键单击Docker Quickstart,选择以管理员身份运行

它将设置默认虚拟框中的虚拟机

It will setup default VM again in Virtual Box

引用详细信息

注意:如果有的话,您将丢失所有现有的Docker映像。

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

编辑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

您可以在 192.168.99.100:9999

假设 8082 是配置的spring Application端口,并且您想访问主机上的 9999 端口。

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

假定主机上的 9999 端口可用(该端口上没有应用程序运行),否则可能抛出端口已在使用中错误

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

这篇关于Docker主机未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆