5

I ran a docker container that exposes port 443. docker ps confirms that it is exposed.

~ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
42b17c2a4b75        tmp/tmp             "/usr/bin/tini -- /bi"   57 seconds ago      Up 55 seconds       443/tcp             adoring_austin

However, netstat doesn't show this port. I cannot reach it from a browser either.

~ netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN

The command that I used the run the container is just JupyterHub.

[I 2016-11-22 03:12:11.494 JupyterHub app:643] Writing cookie_secret to /jupyterhub_cookie_secret
[W 2016-11-22 03:12:12.562 JupyterHub app:304]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[W 2016-11-22 03:12:12.655 JupyterHub app:757] No admin users, admin interface will be unavailable.
[W 2016-11-22 03:12:12.655 JupyterHub app:758] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2016-11-22 03:12:12.655 JupyterHub app:785] Not using whitelist. Any authenticated user will be allowed.
[I 2016-11-22 03:12:12.671 JupyterHub app:1231] Hub API listening on http://172.17.0.3:8081/hub/
[I 2016-11-22 03:12:12.676 JupyterHub app:968] Starting proxy @ http://*:443/
03:12:12.861 - info: [ConfigProxy] Proxying https://*:443 to http://172.17.0.3:8081
03:12:12.864 - info: [ConfigProxy] Proxy API at http://127.0.0.1:444/api/routes
[I 2016-11-22 03:12:12.883 JupyterHub app:1254] JupyterHub is now running at http://127.0.0.1:443/

What am I doing wrong here?

Fabian
  • 990
  • 3
  • 11
  • 24

1 Answers1

5

By default, this Jupyterhub Docker image just exposes the port 8000. You can read here. To use SSL (port 443), you might do some extra steps.

You can check it on port 8000.

Stop and remove your containers

docker stop jupyterhub
docker rm jupyterhub

Start the jupyterhub with the mapped ports:

docker run -d --name jupyterhub -p 443:443 -p 8000:8000 jupyterhub/jupyterhub jupyterhub

Check it at http://YOUR_DOCKER_IP:8000/, port 443 is not available.

docker ps
CONTAINER ID        IMAGE                   COMMAND             CREATED
STATUS              PORTS                                          NAMES
0a123216ee9f        jupyterhub/jupyterhub   "jupyterhub"        26 seconds ago
Up 3 seconds        0.0.0.0:443->443/tcp, 0.0.0.0:8000->8000/tcp   jupyterhub
Tuan
  • 2,303
  • 2
  • 25
  • 37