How to make multiple docker container belong to the same subnet

  docker, question

I know that multiple container hard drives can be mounted together. Can the network also be mounted under the same subnet?
(does not use host mode)

You can create a bridging network and then run the container link to create the new network:

$ docker network create -d bridge my-net
 $ docker run -it --rm --name busybox1 --network my-net busybox sh
 $ docker run -it --rm --name busybox2 --network my-net busybox sh

Reference: …