1
- # The build stage
2
- # ---------------
3
- FROM python:3.9-bullseye as build-stage
4
-
5
- # VULN_SCAN_TIME=
6
-
7
- WORKDIR /build-stage
8
-
9
- # Build wheels for packages that require gcc or other build dependencies and
10
- # lack wheels either for amd64 or aarch64.
11
- COPY requirements.txt requirements.txt
12
- RUN pip wheel -r requirements.txt
13
-
14
- # The final stage
15
- # ---------------
16
1
FROM python:3.9-slim-bullseye
17
2
18
3
# VULN_SCAN_TIME=
@@ -25,7 +10,6 @@ ENV DEBIAN_FRONTEND=noninteractive \
25
10
NB_UID=1000 \
26
11
HOME=/home/jovyan
27
12
28
- USER root
29
13
RUN apt-get update \
30
14
&& apt-get upgrade -y \
31
15
&& apt-get install -y --no-install-recommends \
@@ -39,15 +23,6 @@ RUN apt-get update \
39
23
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
40
24
&& locale-gen
41
25
42
- COPY --from=build-stage /build-stage/*.whl /tmp/pre-built-wheels/
43
- RUN pip install --no-cache-dir /tmp/pre-built-wheels/*.whl
44
-
45
- # nbgitpuller is installed in requirements.txt for demo purposes, and this
46
- # enables it to function.
47
- RUN jupyter serverextension enable --py nbgitpuller --sys-prefix
48
-
49
- # conda/pip/apt install additional packages here, if desired.
50
-
51
26
RUN adduser --disabled-password \
52
27
--gecos "Default user" \
53
28
--uid ${NB_UID} \
@@ -57,4 +32,11 @@ RUN adduser --disabled-password \
57
32
58
33
USER $NB_USER
59
34
35
+ COPY requirements.txt /tmp/requirements.txt
36
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
37
+
38
+ # nbgitpuller is installed in requirements.txt for demo purposes, and this
39
+ # enables it to function.
40
+ RUN jupyter serverextension enable --py nbgitpuller --sys-prefix
41
+
60
42
ENTRYPOINT ["tini" , "--" ]
0 commit comments