forked from hasura/jupyter-code-api-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (36 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.11-slim-bullseye
ARG DEBIAN_FRONTEND=noninteractive
RUN set -e; \
apt-get update -y && apt-get install -y \
nginx \
jq \
apache2-utils \
curl apt-transport-https ca-certificates gnupg2 gcc git\
lsb-release; \
echo "deb http://packages.cloud.google.com/apt cloud-sdk main" | \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list; \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key add -; \
apt-get update; \
apt-get install -y google-cloud-sdk \
&& apt-get clean
# Set fallback mount directory
ENV MNT_DIR /mnt/gcs
COPY ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
# supervisor
RUN pip install supervisor git+https://github.com/coderanger/supervisor-stdout
COPY notebook /notebook
COPY config.json /config.json
COPY config.json /etc/connector/config.json
COPY jupyter_notebook_config.py /jupyter_notebook_config.py
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +x /tini
WORKDIR /src
COPY app.py start.sh nginx.conf ./
# If making FrontEnd changes, build and push the `build` directory as well to save time during deployment
COPY frontend/build frontend/build
COPY supervisor/ /supervisor/
RUN chmod +x /supervisor/stop-supervisor.sh
ENTRYPOINT ["/tini", "--", "./start.sh"]