[docker]docker网络类型network –network
来源:互联网 发布:淘宝100津贴是什么意思 编辑:程序博客网 时间:2024/06/05 21:06
参考:
Connect a container to a network (–network)
$ docker network lsNETWORK ID NAME DRIVER7fca4eb8c647 bridge bridge9f904ee27bf5 none nullcf03ee007fb4 host host
When you start a container use the --network
flag to connect it to a network. This adds the busybox
container to the my-net
network.
$ docker run -itd --network=my-net busybox
You can also choose the IP addresses for the container with --ip
and --ip6
flags when you start the container on a user-defined network.
$ docker run -itd --network=my-net --ip=10.10.9.75 busybox
If you want to add a running container to a network use the docker network connect
subcommand.
You can connect multiple containers to the same network. Once connected, the containers can communicate easily need only another container’s IP address or name. For overlay
networks or custom plugins that support multi-host connectivity, containers connected to the same multi-host network but launched from different Engines can also communicate in this way.
Note: Service discovery is unavailable on the default bridge network. Containers can communicate via their IP addresses by default. To communicate by name, they must be linked.
You can disconnect a container from a network using the docker network disconnect
command.
参考https://docs.docker.com/engine/reference/commandline/run/#connect-a-container-to-a-network---network
- [docker]docker网络类型network –network
- docker network
- docker network
- docker network
- Docker Network Configuration 高级网络配置
- Docker Network Configuration 高级网络配置
- Docker 网络(十一)——Docker Multi-host Network
- 17 - Docker network第三讲-自定义网络(Docker系列)
- 18 - Docker network第四讲-网络别名(Docker系列)
- docker overlay network测试
- Docker network命令
- Docker的network containers
- 玩转Docker Network
- Docker network命令
- Docker network命令
- Docker 1.9 Overlay Network实现跨主机网络互通
- docker plugin插件-----网络插件插件 network plugin(weave)
- 理解Docker容器网络之Linux Network Namespace
- CCF NOI 1035数根
- seq2seq 做翻译,预测时 最终feed的数据的样子(接上文)
- detached entity passed to persist
- diqu地区市的wheel样式
- 第四天H5进阶
- [docker]docker网络类型network –network
- nil NULL Nil NSNull 区别
- iOS基础之OC简单控件知识了解(三)
- 最全面的Java字节byte操作,处理Java基本数据的转换及进制转换操作工具,流媒体及java底层开发项目常用工具类
- 逗号分割符--字段中含逗号等情况的解析方法Java实现
- 怎么查看linux文件夹有多少个文件?/ mysql数据库实时备份主从架构
- Activity的三种跳转
- 常见的几种异常类型Exception
- Android开发之透明导航栏状态栏后与软键盘产生冲突的问题解决