gophernotes: Can't reach the local site

$ docker run --name gophernotes --net host -it dwhitena/gophernotes:latest
[I 09:52:12.780 NotebookApp] Copying /.ipython/kernels -> /.local/share/jupyter/kernels
[I 09:52:12.790 NotebookApp] Writing notebook server cookie secret to /.local/share/jupyter/runtime/notebook_cookie_secret
[I 09:52:12.860 NotebookApp] Serving notebooks from local directory: /
[I 09:52:12.860 NotebookApp] 0 active kernels
[I 09:52:12.860 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 09:52:12.860 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:52:12.860 NotebookApp] No web browser found: could not locate runnable browser.

and when stopping:

^C[I 09:53:45.030 NotebookApp] interrupted
Serving notebooks from local directory: /
0 active kernels
The IPython Notebook is running at: http://localhost:8888/
Shutdown this notebook server (y/[n])? ^C[C 09:53:46.720 NotebookApp] received signal 2, stopping
[I 09:53:46.720 NotebookApp] Shutting down kernels
$ docker version
Client:
 Version:      1.10.0
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   590d510
 Built:        Fri Feb  5 08:21:41 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.10.0
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   590d5108
 Built:        Thu Feb  4 19:55:25 2016
 OS/Arch:      linux/amd64

I assume it’s because the NotebookApp tries to find its own server by pinging localhost, which on OS X using boot2docker or dlite does not make sense as the guest’s container runs inside a VM rather the host.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

@sudoliyang Awesome!

I was right where you are in the process a couple days ago. Two notes: you don’t need a package or main function declaration and you need to use “:import” (with a colon) instead of “import”.