port

  • 用法
  1. Usage: docker port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]]
  2. List port mappings for the CONTAINER, or lookup the public-facing port that
  3. is NAT-ed to the PRIVATE_PORT
  4. --help=false Print usage
  • 例子
  1. $ sudo docker port 60095325e584
  • 总结

打印出Host主机端口与容器暴露出的端口的NAT映射关系