Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

313
Visualizações
Understanding docker port mappings

Please explain the following output:

docker ps ExanpleContainter

Ports
--------
10.10.10.10:443->443/tcp, 0.0.0.0:1937->1937/tcp

And, docker inspect ExanpleContainter

"Ports": {
  "1937/tcp": [
    {
      "HostIp": "0.0.0.0",
      "HostPort": "1937"
    }
  ],
  "443/tcp": [
    {
      "HostIp": "10.10.10.10",
      "HostPort": "443"
    }
  ]
}

I'd want to understand how mapping is done and which port is mapped where?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

10.10.10.10:443->443/tcp

This means docker host IP 10.10.10.10 on port 443 is mapped to specified container on port 443. packets arriving at that ip port combination will be accessible in the container on the same port (443)

0.0.0.0:1937->1937/tcp

Packets arriving on all available IP addresses (0.0.0.0) on docker host on port 1937 are accessible on specified container on the same port (1937)

Read explanation in the answer and compare it to output of docker inspect ExanpleContainter.

over 4 years ago · Santiago Trujillo Relatório

0

Above answer is correct I am trying to explain another way which helped me understand port mappings.

docker ps ExanpleContainter

Ports


10.10.10.10:443->443/tcp, 0.0.0.0:1937->1937/tcp

Here your container ExanpleContainer is exposing two ports.

  1. 10.10.10.10:443->443/tcp
  2. 0.0.0.0:1937->1937/tcp

Output in following format,

[IP_ADDR]:{PORT_OUTSIDE_CONTAINER} -> {PORT_INSIDE_CONTAINER} / {PROTOCOL} 

Now while creating container if you don't specify which internal ports to map it will map random ports but in your case both (host and exposed) ports are mapped same.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda