Troubleshoot - terminal hangs on launch, Docker image fails in Linux, works in macOS

I have resolved the issue. It is actually two folds/steps process:

  1. Configure NGINX proxy

  2. Setting c.NotebookApp.allow_origin = '*'

  3. For server directive that is listening on 443 ssl:

location / {

     proxy_set_header        Host $host;
     proxy_set_header        X-Real-IP $remote_addr;
     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header        X-Forwarded-Proto $scheme;

     set $upstream_app jupyter-tensorflow-notebook;
     set $upstream_port 8888;
     set $upstream_proto http;
     proxy_pass $upstream_proto://$upstream_app:$upstream_port;
     proxy_read_timeout  90;

     # WebSocket support
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
 }
  1. Then update jupyter_notebook_config.py and set c.NotebookApp.allow_origin = ‘*’ there.