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

来源:互联网 发布:云计算第二版 编辑:程序博客网 时间:2024/05/22 11:32
      
         
  1. stop running container
            docker ps -a
      docker stop test01
   2. commit the container
            docker commit test01 test02
      NOTE: The above, test02 is a new image that I'm constructing from thetest01 container.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
0 0
原创粉丝点击