[英]How do I configure a bridged network for Docker?
I'm new to Docker (have been working with KVM earlier). 我是Docker的新手(之前已经在KVM上工作)。 The first problem I ran in to was how to configure a bridged network in Docker.
我遇到的第一个问题是如何在Docker中配置桥接网络。 I would to have a similiar configuration as a KVM bridged network.
我将有一个类似的配置作为KVM桥接网络。 Does anyone know if this is possible?
有人知道这是否可能吗?
docker run --network=host
But if what you want is to access your container from outside use the port mapping option. 但是,如果要从外部访问容器,请使用端口映射选项。
docker run -p 80:80
You will access your container using the host ip and the port you specified. 您将使用主机ip和指定的端口访问容器。
Docker internally in linux use iptables to redirect the traffic from your host to the container. Linux内部的Docker使用iptables将流量从主机重定向到容器。
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.