search

Home  >  Q&A  >  body text

docker port 报错

使用 “docker port 容器id 容器port” 映射容器的端口时,系统报错如下:

*[root@DockerServer ~]# docker port e7d817698b6f 80
2014/04/06 16:08:07 Error: No public port '80' published for e7d817698b6f

这是什么原因,大家有知道的吗?

迷茫迷茫2848 days ago739

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-21 10:57:39

    Is the container port not EXPOSE beforehand?

    reply
    0
  • PHPz

    PHPz2017-04-21 10:57:39

    Expose the port first.

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 10:57:39

    The permissions are not enough. sudo docker port e7d817698b6f 80. Test or change to another port number (>1024)

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 10:57:39

    1. Specify the port to EXPOSE when creating.
    2. Specify when startingPublishAllPort = true

    reply
    0
  • Cancelreply