I’m currently trying to run my application on production with docker on a VPS with Ubuntu 22 installed.
But I can’t access the application, every time I get a timeout on the port that I’ve set.
So I tried the most simple docker image to test what going wrong and even the simple nginx image gives me the same result.
On my PC everything is working great:
But on my VPS it’s not working at all:
And I’ve tried to remove the docker container and then call the localhost again and I get a connection refused, which means that there is nothing running on it.
I’ve tried a lot of thing like uninstall Docker and install it again, forcing the IP to 0.0.0.0 or 127.0.0.1 etc
2
Answers
Most likely you have the same port, try changing to -p 8080:80
Probably you could try removing the
-d
flag and up the docker using the mentioned command. And can simply go through the error logs 🙂 [error messages are damn cool to have, than having a unusually tidy output]