Exposing additional ports on MyBinder using Dockerfiles

Hi all,
I want to run an application on MyBinder using a Dockerfile. However, my application starts with an additional web server. It seems that MyBinder only exposes the port in which the jupyter server is running. Is there a way to expose additional ports? For instance, in plain docker, I can use this command:
docker run -p 8081:8081 -p 8031:8031.

Is there something similar on MyBinder?

Thanks a lot

On a stock binder, the app get one port.

If still running something jupyter-compatible as pid <2, something like e.g. jupyter-server-proxy can be installed to proxy additional ports, under variously-discoverable routes. In this case, http://binder.wherever/whoever-whatever-oauva898ashd/proxy/8031 would be available without any configuration.

3 Likes