Home > other >  Docker creates multiple containers with the same mysql mirror can use only one container
Docker creates multiple containers with the same mysql mirror can use only one container

Time:10-13

Docker creates multiple containers with the same mysql mirror is only one container, you can use the Internet because more containers used on images of the same port, any good solution

CodePudding user response:

Start the container can be used when the parameters are specified port mapping, map the container ports used to hosting a different port, there is no conflict

CodePudding user response:

Docker run - itd - p - 3306-3306 name=mysql1 MYSQL_ROOT_PASSWORD=123 - e mysql: 5.6
Docker run - itd - p - 3307-3306 name=mysql1 MYSQL_ROOT_PASSWORD=123 - e mysql: 5.6
I do

CodePudding user response:

The method above can be, and can be on the network card IP, different container go IP, is equal to a server running for two full system,

CodePudding user response:

To deploy with k8s wouldn't have this problem
  • Related