【发布时间】:2020-08-02 03:04:00
【问题描述】:
继续Docker host network container service access under Windows,
我很难尝试在 Linux 容器中公开服务(即它们的端口),以便可以直接从主机访问它们。
如果主机是 Linux,我知道用于排除故障的一整套工具。但是对于Windows主机,我不知道从哪里开始以及如何逐步排除故障。
我在 Windows 上使用 -p 3999:3999 启动 docker,并在 Linux 容器中启动基于 Go 的 Web 服务,侦听 0.0.0.0:3999。这些是我在主机是 Linux 时一直在做的事情,没有任何问题。现在唯一的区别是,
- 主机现在是 Windows
- 可能没有任何关联,但 Windows 使用的是公司的透明代理。
如何逐步解决问题?
更新:
我没有安装防火墙 --
% iptables -L
-bash: iptables: command not found
% sudo iptables -L
sudo: iptables: command not found
% ufw status
-bash: ufw: command not found
% dpkg -l | grep fire || echo no firewall found
no firewall found
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye
【问题讨论】:
标签: linux docker networking service debian-based