Remote access to server running in container

I have a server that runs in a container. It listens on port 8000. The container is started with:


Running a client on the same host as the server, and connecting to 48000 works fine. But I need to access the server from a remote host. If I run it remotely and use I get no route to host. If I use I get 405 Not Allowed, but that is coming from nginx running on, not from my server (which is running wsgi). How can I remotely access my server running in the container?

The “” in that docker run -p option means “only listen on localhost and don’t respond to any other interface”. Just remove it, docker run -p 48000:8000 ...

1 Like