怎么修改docker配置
世界只因有你
世界只因有你 2017-04-25 09:03:39
0
2
679

已存在的容器,原来端口-p 80:66 要怎么操作才能把端口改成 -p 80:77,就是把映射从66改到77?必须要重新建一个容器吗?

世界只因有你
世界只因有你

reply all (2)
世界只因有你

You shouldn’t be able to change the port now. You can look at the docker update option

    某草草

    After checking the information, it seems that it is currently not possible to directly modify the port expose on the original container, and the docker update command does not support it. This demand is very loud.

    Submitting the current container into an image and then running it from the new image is also a compromise.

    --- update

    ModifyDockerfile里的exposeand then build it again.

    If you don’t want to rebuild the container, you can expose it indocker run使用--expose参数指定,相当于覆盖Dockerfile.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!