docker ip 修改
docker 端口映射修改
方法一 重建容器
$ docker stop test01
$ docker commit test01 test02
$ docker run -p 8080:8080 -td test02
$ docker rm test01
方法二 修改容器配置文件,重启docker服务
docker inspect <container_name>
docker stop <container_name>
snap stop docker
vim /var/snap/docker/common/var-lib-docker/containers/<hash_id>/hostconfig.json // "PortBindings":{"8090/tcp":[{"HostIp":"127.0.0.1","HostPort":"8090"}]}
snap start docker
docker start <container_name>