I've set up an Ubuntu 14.04 AWS instance. My security group has port 8888 open (tcp), and port 22 open for ssh.
I can ssh into the instance just fine, then in the instance I start a docker container:
docker run -it --name="test" -p 8888:9999 b.gcr.io/tensorflow/tensorflow:latest-devel
This container has jupyter notebook in it, then in the container I run jupyter notebook and I see the correct output:
[I 14:49:43.788 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/
[I 14:49:43.788 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
And if I run docker ps by opening another ssh, connection I see:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8414f19fcd5f b.gcr.io/tensorflow/tensorflow:latest-devel "/bin/bash" 38 minutes ago Up 23 minutes 6006/tcp, 8888/tcp, 0.0.0.0:8888->9999/tcp test
So everything seems correct, but I do not see jupyter notebook at: http://PUBLICIP:8888