Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
fix(container): register common ssh keys to avoid clone hanging jupyt…
Browse files Browse the repository at this point in the history
…er lab
  • Loading branch information
ssube committed Dec 23, 2019
1 parent 563cbd7 commit 733a36c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docker/Dockerfile.jupyter-10
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ RUN pip install --upgrade jupyterlab-git psycopg2

USER jovyan

RUN jupyter lab build
RUN jupyter lab build

RUN mkdir -p ${HOME}/.ssh \
&& ssh-keyscan github.com gitlab.com git.apextoaster.com >> ${HOME}/.ssh/known_hosts
5 changes: 4 additions & 1 deletion docker/Dockerfile.jupyter-11
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ RUN pip install --upgrade jupyterlab-git psycopg2

USER jovyan

RUN jupyter lab build
RUN jupyter lab build

RUN mkdir -p ${HOME}/.ssh \
&& ssh-keyscan github.com gitlab.com git.apextoaster.com >> ${HOME}/.ssh/known_hosts
7 changes: 6 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ To run the Jupyter lab server with Git and Postgres credentials:

```shell
docker run --rm -it \
-v $(dirname ${SSH_AUTH_SOCK}) \
-v $(dirname ${SSH_AUTH_SOCK}):$(dirname ${SSH_AUTH_SOCK}):rw \
-v $(pwd):$(pwd):rw \
-e SSH_AUTH_SOCK=${SSH_AUTH_SOCK} \
-e PROMSQL_CONNSTR="postgres://user.password@server:port/database" \
-p 8888:8888 \
ssube/prometheus-sql-adapter:jupyter-10
```

**Note**: if `git clone` fails, the Jupyter Lab UI will enter an infinite
busy loop, repeatedly checking the response's status. This will cause the
tab to freeze, and the only error appears in the network debugger. The
only fix appears to be closing the tab.

0 comments on commit 733a36c

Please sign in to comment.