I’m creating a Render Web Service from a Docker image, but the deployment keeps failing with this error:
No open ports detected, continuing to scan...
Port scan timeout reached, no open ports detected.
Bind your service to at least one port.
Locally, I run the container like this and it works fine:
docker run -p 3001:4000 my-image
This maps host port 3001 → container port 4000.
However, on Render I don’t see a way to specify -p 3001:4000.
How do I correctly configure port mapping on Render for a Docker-based web service?
-
Which port should my app bind to inside the container?
-
Tried uisng
PORTenvironment variable, that didn’t work -
Is there any equivalent of
-pon Render?