Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
Cant reach node server running in docker container in vm

I have a dockerized node app running inside a container on an ubuntu-vm-host with static address, but can only reach it through localhost. I use the command: sudo docker run -d -p 49160:3000 8a5ccd9f4cca to start the app. I can reach running node servers on the vm without any trouble when they are run in the vm without docker. When i curl http://localhost:49160/test i get a response. but if i try to change it to curl http://"correct ip address":49160/test it doesnt work.

The forwarding port shows up when i netstat -l inside the ubuntu-vm-host. If i do:

curl  http://172.17.0.1:49160/test

which is the docker0 network interface inet address, it gets through.

netstat -l command

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Sorry for the previous irresponsible answer. To debug the issue

UPDATED

First to see if the app is running correctly try,

docker logs <container id>

if all the console out put that you usually print out is there,

Scenario 1 : If it is not, run the docker using the -it flag instead of -d manually start the process and check with a curl to debug.

docker run -it -p 49160:3000 <image id> /bin/bash

Scenario 2 : If it is running, check if the internal ubuntu firewall is enabled using the following, if so if you don't need it disable it.

sudo ufw status

to disable : sudo ufw disable to allow : sudo ufw allow 49160

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda