# Repo2docker cannot open in browser when using cached container

**URL:** <https://discourse.jupyter.org/t/repo2docker-cannot-open-in-browser-when-using-cached-container/5065>\
**Category:** General\
**Created:** [July 3, 2020, 12:41pm UTC](https://discourse.jupyter.org/t/repo2docker-cannot-open-in-browser-when-using-cached-container/5065 "2020-07-03T12:41:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkmann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/kkmann/32/377_2.png) [@kkmann](https://discourse.jupyter.org/u/kkmann)\
**Post date:** [July 3, 2020, 12:41pm UTC](https://discourse.jupyter.org/t/repo2docker-cannot-open-in-browser-when-using-cached-container/5065/1 "2020-07-03T12:41:42Z")

</div>

Hi,

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

running

```auto
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](https://hub.docker.com/repository/docker/kkmann/unplanned-sample-size-adaptation).  
I would expect

```auto
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](http://127.0.0.1:8888/?token=30f4fbcfbd8a41d003b7f0f8b6f5e9c2385ae6b9392458c6)) but following that results in

```auto
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.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [July 3, 2020, 6:25pm UTC](https://discourse.jupyter.org/t/repo2docker-cannot-open-in-browser-when-using-cached-container/5065/2 "2020-07-03T18:25:21Z")

</div>

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

```auto
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.
