docker - 无法从我的 Docker 容器 ping Windows 主机
问题描述
我在 Windows 2016 服务器上使用 Docker Desktop 运行 docker 容器。我在 Windows 2016 服务器上使用 Docker Desktop,而不是 Docker EE,因为我想运行 Linux 容器。Docker的详细信息如下:-
Docker 桌面版本是
版本 2.0.0.3 (31259) 频道:稳定
docker info 的输出如下: -
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 2
Server Version: 18.09.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: linuxkit-00155d2dab04
ID: OQK7:Z24A:V5KV:CYEW:6QQE:KXOB:UXWY:KVRF:QEHF:SATF:CTLU:WTPM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 32
Goroutines: 53
System Time: 2020-02-26T06:36:51.0000459Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
docker版本的输出如下: -
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:13:06 2019
OS/Arch: linux/amd64
Experimental: false
我无法从我的 Linux 容器 ping 我的 Windows 主机。
但这在我的 Windows 10 机器上是可能的。
这有什么我想念的线索???
解决方案
运行ifconfig
并检查 docker0 接口的 IP。
并使用该IP ping。
推荐阅读
- sql - 如何用 SQL 计算行之间的差异?
- excel - 在电子表格中配置一系列单元格以自动链接到电子邮件或网站
- swift - Swift以编程方式创建uiimageview全宽屏幕保持高度比
- python - 格式化从python中美丽的汤中获得的文本
- r - 如何使用 write.table 追加但 col.names 只出现一次(在输出文件的顶部)?
- java - 写入属性文件
- javascript - 选择一个文本,把它加粗,然后保存粗体标签的位置,以便以后围绕这些相同的文本
- java - 使用 jason.simple 将用户定义的数据类型转换为 JSON 对象类型
- python - 我可以用不同的消息向不同的收件人发送不同的邮件吗
- excel - Delphi/Excel - 工作表未实例化