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

234
Visualizações
Docker image cannot connect on localhost

I am using this Dockerfile to create an image and start a container:

FROM node:6.1.0-wheezy 
RUN mkdir /usr/src/goof
COPY . /usr/src/goof
WORKDIR /usr/src/goof

RUN npm install
EXPOSE 3112
EXPOSE 31337
CMD ["npm", "start"]

So the image was created and also the container started but when I try to access it using localhost:3112 is not working.
Does anybody know what could be the problem ?

This is the code structure: enter image description here

and this is the command how I start the container docker run --rm -p 3112:3112 --name rce rce

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As you mention in the comments it looks that you expose the wrong port for your node app

so all you need is to expose port 3113 for your app and when you run your container will be something like this

docker run --rm -p 3113:3113 -p 3112:3112 --name rce rce
about 4 years ago · Juan Pablo Isaza 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