search

Home  >  Q&A  >  body text

docker如何指定容器的ip地址啊?

我的网卡默认有一个docker0,ip为172.17.42.1,我想容器分配的固定ip为172.17.0.155

为情所困为情所困2806 days ago805

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-24 16:01:03

    Isn’t itsudo docker run -p 172.17.0.155:80 <imageID>?
    I don’t understand whether you want to change the port mapped to the outside of the container to this IP or whether you want to run the things inside the container on the internal IP.

    reply
    0
  • Cancelreply