docker: 为运行的container增加多个端口

2023-05-16

1. list all docker process and stop running container test01

docker ps -a

docker stop test01

2. commit the container

docker commit test01 test02

NOTE: test02 是新的image name       

3. re-run from the commited image

docker run -p 8080:8080 -p 80:80 -td test02

 

http://stackoverflow.com/questions/19335444/how-do-i-assign-a-port-mapping-to-an-existing-docker-container

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

docker: 为运行的container增加多个端口 的相关文章

随机推荐