Repo2docker cannot open in browser when using cached container

Hi,

I work on mac with python 3.8.3 / jupyter-repo2docker 0.11.0.

running

jupyter-repo2docker -E .

works like a charm for me and I can open Jupyter lab in Firefox. Trying to first build the container and push it to dockerhub, then download and run locally does not work for me though.
I build the container using the Github action to https://hub.docker.com/repository/docker/kkmann/unplanned-sample-size-adaptation.
I would expect

docker run kkmann/unplanned-sample-size-adaptation

to give me non-editable version of the repo locally. The container seems to run fine and gives me the usual link rto open in my browser (e.g. http://127.0.0.1:8888/?token=30f4fbcfbd8a41d003b7f0f8b6f5e9c2385ae6b9392458c6) but following that results in

Unable to connect

Firefox can't establish a connection to the server at 127.0.0.1:8888.

Do I need to specify more arguments for run? I could not find any documentation on this use case online.

Hi. By default docker run doesn’t forward any ports- this applies to all Docker images, not just those created by repo2docker. Try something like

docker run -p 8888:8888 kkmann/unplanned-sample-size-adaptation

to map port 8888 on localhost/127.0.0.1 to port 8888 inside the container.

1 Like