Is the port common to all docker networks?

I created two docker networks

  • chnetwork

     docker network create --subnet=172.19.0.0/16 chnetwork
    
  • Intranet

     docker network  create --internal --subnet 10.1.1.0/24 internal-network
    

when creating docker container i use chnetwork ,

docker run -it -d --name containerone -h www.cone.net -v /var/www/html -p 3006:80 --net chnetwork --ip 172.19.0.40 --privileged magento

I later changed to Internal network and disconnected the container from chnetwork

docker network connect internal-network containerone
docker network disconnect chnetwork containerone

Now the problem in the docker ps command does not display the port of this container, I mean that the port is not available on the internal network .

when I change the network on chnetwork only on docker ps . What do I need to do for the port, available on all docker networks?

+1
source share
1 answer

, -, . , , , , . , , - . , , .

+2

Source: https://habr.com/ru/post/1657039/


All Articles