This repository was archived by the owner on Mar 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM jupyter/minimal-notebook:latest
1
+ FROM jupyter/minimal-notebook:45bfe5a474fa
2
+
3
+ ARG PGWEB_VERSION=0.11.6
2
4
3
5
USER root
4
6
RUN apt-get update \
7
+ && apt-get upgrade -y \
5
8
&& apt-get install -y \
6
9
curl \
7
10
unzip \
8
- wget
11
+ wget \
12
+ && apt-get clean \
13
+ && rm -rf /var/lib/apt/lists/*
9
14
10
15
# install pgweb
11
- ENV PGWEB_VERSION=0.11.6
16
+ ENV PGWEB_VERSION="${PGWEB_VERSION}"
12
17
RUN wget -q "https://github.com/sosedoff/pgweb/releases/download/v${PGWEB_VERSION}/pgweb_linux_amd64.zip" \
13
18
&& unzip pgweb_linux_amd64.zip -d /usr/bin \
14
19
&& mv /usr/bin/pgweb_linux_amd64 /usr/bin/pgweb
15
20
16
21
# setup package, enable classic extension, build lab extension
17
22
USER "${NB_USER}"
18
- COPY . " ${HOME}" /
19
- COPY requirements.txt " ${HOME}" /
20
- WORKDIR "${HOME}"
23
+ RUN mkdir -p "/ ${HOME}/jupyter-pgweb-proxy"
24
+ COPY . "/ ${HOME}/jupyter-pgweb-proxy"
25
+ WORKDIR "/ ${HOME}/jupyter-pgweb-proxy "
21
26
RUN python3 -m pip install .
22
27
RUN python3 -m pip install -r requirements.txt \
23
28
&& jupyter serverextension enable --sys-prefix jupyter_server_proxy \
@@ -29,3 +34,5 @@ USER root
29
34
RUN fix-permissions /etc/jupyter
30
35
31
36
USER "${NB_USER}"
37
+
38
+ WORKDIR "${HOME}"
Original file line number Diff line number Diff line change 10
10
"headers" : {"Content-Security-Policy" : "frame-ancestors 'self' *" },
11
11
"cookie_options" : {"SameSite" : "None" , "Secure" : True },
12
12
}
13
+
14
+ # allows running the notebook as root
13
15
c .NotebookApp .allow_root = True
16
+
17
+ # accepts any origin by default, change to add restrictions
14
18
c .NotebookApp .allow_origin = '*'
19
+
20
+ # add a token if you would like to run this notebook on a public network
15
21
c .NotebookApp .token = ''
22
+
23
+ # forward to jupyterlab by default
16
24
c .NotebookApp .default_url = '/lab'
You can’t perform that action at this time.
0 commit comments