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

516
Visualizações
Docker: cannot link containers in --net=host mode

I have a Couchbase server container named db launched with --net=host option which exposes port 11210, and now I have to link another container to it. If I use the --link option while running my new container, that is type:

docker run -d -P --name my_name --link db:db my_image

I get:

Error response from daemon: Conflicting options: host type networking can't be used with links. This would result in undefined behavior.

How can I solve this?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can't.

"Linking" containers doesn't make any sense when using --net=host. When you link containers, Docker creates entries in /etc/hosts so that the containers can connect to each other by name, but when using --net=host your containers do not have unique addresses. They are sharing the host network environment.

You can just use localhost to access services running in either container, or any valid address on your host (assuming that your service is configured to listen on all available addresses).

about 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