Basic Dockerfile for building Jupyterhub, but spawning is failing

#1

This is docker file, which I use to create my jupyterhub image. Am I missing anything here? I build this image and then run jupyterhub as a service. I can log into jupyterhub as a jupyterhub admin, but the single user notebook fails to start.
---------------------------- Dockerfile -----------------------

FROM jupyterhub/jupyterhub-onbuild:latest
EXPOSE 8000
RUN /opt/conda/bin/conda install notebook jupyterlab
RUN python3 -m pip install --upgrade notebook
RUN /opt/conda/bin/pip install oauthenticator dockerspawner globus-sdk
## this just creates a user I can test with
RUN useradd -rm -d /home/alvin -s /bin/bash -g root -G sudo -u 1000 alvin -p "$(openssl passwd -1 realstrong)"
WORKDIR /srv/jupyterhub/

my browser is just sits on - https://www.sgsup-jupyterhub.duckdns.org/hub/spawn-pending/alvin

and the browser shows this error


Event log

Server requested

Spawning server...

Spawn failed: Server at http://jupyter-alvin:8888/user/alvin/ didn't respond in 30 seconds

From the command line I can see the singleuser-notebook start, but something happens and jupyterhub basically gives up
this isn’t the whole log, because it kind of repeats itself…

[I 2019-05-14 02:08:30.862 JupyterHub log:174] 302 GET /hub/ -> /hub/spawn (alvin@149.169.63.7) 27.64ms
[I 2019-05-14 02:08:31.030 JupyterHub dockerspawner:784] Service 'jupyter-alvin' is gone
[I 2019-05-14 02:08:31.049 JupyterHub dockerspawner:990] Created service jupyter-alvin (id: i0rfgoe) from image jupyterhub/singleuser:1.0
[I 2019-05-14 02:08:31.050 JupyterHub dockerspawner:1013] Starting service jupyter-alvin (id: i0rfgoe)
[I 2019-05-14 02:08:31.936 JupyterHub log:174] 302 GET /hub/spawn -> /hub/spawn-pending/alvin (alvin@149.169.63.7) 1018.87ms
[I 2019-05-14 02:08:32.090 JupyterHub pages:303] alvin is pending spawn
[I 2019-05-14 02:08:32.093 JupyterHub log:174] 200 GET /hub/spawn-pending/alvin (alvin@149.169.63.7) 103.18ms
[W 2019-05-14 02:08:40.950 JupyterHub base:932] User alvin is slow to become responsive (timeout=10)
[W 2019-05-14 02:09:02.287 JupyterHub user:678] alvin's server never showed up at http://jupyter-alvin:8888/user/alvin/ after 30 seconds. Giving up
[I 2019-05-14 02:09:02.303 JupyterHub dockerspawner:1107] Stopping service jupyter-alvin (id: i0rfgoe)
[I 2019-05-14 02:09:02.303 JupyterHub swarmspawner:232] Removing service i0rfgoec1y7ecybs03zs6ylie
[E 2019-05-14 02:09:02.361 JupyterHub gen:593] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py:800> exception=TimeoutError("Server at http://jupyter-alvin:8888/user/alvin/ didn't respond in 30 seconds",)> after timeout
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 589, in error_callback
        future.result()
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 807, in finish_user_spawn
        await spawn_future
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 654, in spawn
        await self._wait_up(spawner)
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 701, in _wait_up
        raise e
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 669, in _wait_up
        http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/utils.py", line 234, in wait_for_http_server
        timeout=timeout,
      File "/opt/conda/lib/python3.6/site-packages/jupyterhub/utils.py", line 177, in exponential_backoff
        raise TimeoutError(fail_message)
    TimeoutError: Server at http://jupyter-alvin:8888/user/alvin/ didn't respond in 30 seconds

/srv/jupyterhub# pip list
Package           Version
----------------- --------
alembic           1.0.10
asn1crypto        0.24.0
async-generator   1.10
attrs             19.1.0
backcall          0.1.0
bleach            3.1.0
certifi           2019.3.9
certipy           0.1.3
cffi              1.12.3
chardet           3.0.4
conda             4.6.14
cryptography      2.3.1
decorator         4.4.0
defusedxml        0.6.0
docker            3.7.2
docker-pycreds    0.4.0
dockerspawner     0.11.1
entrypoints       0.3
escapism          1.0.0
globus-sdk        1.7.1
idna              2.8
ipykernel         5.1.0
ipython           7.5.0
ipython-genutils  0.2.0
jedi              0.13.3
Jinja2            2.10.1
jsonschema        3.0.1
jupyter-client    5.2.4
jupyter-core      4.4.0
jupyterhub        1.0.0
jupyterlab        0.35.5
jupyterlab-server 0.2.0
Mako              1.0.9
MarkupSafe        1.1.1
mistune           0.8.4
nano              0.9.4
nbconvert         5.5.0
nbformat          4.4.0
notebook          5.7.8
oauthenticator    0.8.2
oauthlib          3.0.1
pamela            1.0.0
pandocfilters     1.4.2
parso             0.4.0
pexpect           4.7.0
pickleshare       0.7.5
pip               19.1
prometheus-client 0.6.0
prompt-toolkit    2.0.9
ptyprocess        0.6.0
pycosat           0.6.3
pycparser         2.19
pycurl            7.43.0.2
Pygments          2.4.0
PyJWT             1.7.1
pyOpenSSL         19.0.0
pyrsistent        0.14.11
PySocks           1.6.8
python-dateutil   2.8.0
python-editor     1.0.4
pyzmq             18.0.0
requests          2.21.0
ruamel-yaml       0.15.71
Send2Trash        1.5.0
setuptools        41.0.1
six               1.12.0
SQLAlchemy        1.3.3
terminado         0.8.2
testpath          0.4.2
tornado           6.0.2
traitlets         4.3.2
urllib3           1.24.2
wcwidth           0.1.7
webencodings      0.5.1
websocket-client  0.56.0
wheel             0.33.1