Exposed ports not being auto detected

In my Dockerfile I explicitly EXPOSE several ports but when I deploy on Render the only way I can get a port open is by setting the PORT environment variable. Is there another way to get Render use certain ports?

Hi,

The EXPOSE command isn’t used by the Render Docker Runtime. The platform attempts to detect the ports of the processes your image starts.

Only one port can be exposed to the public proxy on a Web Service. By default, the platform will try and detect that port, but if you want to disable the port detector and specify the port to use with the public proxy, you can set the PORT env var. More on this in the docs

The ports your service starts are only used on the internal network. Connection from the public internet will alwasy be over the HTTPS default, 443 (docs)

Alan

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.