What does --net=host option in Docker command really do?

前端 未结 3 1482
别那么骄傲
别那么骄傲 2020-11-28 01:55

I\'m a little bit beginner to Docker. I couldn\'t find any clear description of what this option does in docker run command in deep and bit confused about it.

Can we

3条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 02:38

    1. you can create your own new network like --net="anyname"
    2. this is done to isolate the services from different container.
    3. suppose the same service are running in different containers, but the port mapping remains same, the first container starts well , but the same service from second container will fail. so to avoid this, either change the port mappings or create a network.

提交回复
热议问题