昨天我第一次安装和使用了泊坞窗,
一切都运转正常,但昨天晚上我关机了。
今天我启动它,我想在我的docker应用程序上工作,但当我尝试运行它时
docker run -d -p 8080:8080 container/app
我收到了错误:
docker:无法连接到Docker守护程序。 docker守护程序是否在此主机上运行?。
但我无法再找到如何启动码头工具......
想法?
编辑:
eval "$(docker-machine env default)"
结果:
检查TLS连接时出错:主机未运行
答案 0 :(得分:6)
如果"默认" docker-machine env default
命令无法正常工作机器没有运行。
您可以运行docker-machine ls
命令,该命令应该为您提供已配置的计算机列表及其当前状态(正在运行,已停止)。
如果计算机已停止,请运行docker-machine start <name-of-machine>
。之后,您应该能够使用
eval "$(docker-machine env default)"
请阅读https://docs.docker.com/machine/overview处的文档了解更多详情
答案 1 :(得分:0)
运行命令$ docker-machine start default
后,我收到
Starting "default"...
(default) Check network to re-create if needed...
(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is supposed to fix this issue
消息末尾提供了解决方案,
This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is supposed to fix this issue
我卸载然后尝试重新安装VirtualBox
。它仍然是一样的。
然后,我从机器的任何地方允许应用程序,这解决了问题:
允许来自任何地方的应用:sudo spctl --master-disable