1.网络创建:
docker network create --subnet=192.168.1.0/24 --gateway=192.168.1.1 uav_management
2.查看网络:
docker network ls
3.给已经创建的容器分配ip:
docker network connect --ip 192.168.1.10 uav_management 容器名/容器id 示例:docker network connect --ip 192.168.1.10 uav_management MYSQL8.0.27_dji
4.测试
docker inspect MYSQL8.0.27_dji