Skip to content

Commit 6d8f413

Browse files
committed
Remove not needed build stage
1 parent 2df10ab commit 6d8f413

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

images/singleuser-sample/Dockerfile

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
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-
# ---------------
161
FROM python:3.9-slim-bullseye
172

183
# VULN_SCAN_TIME=
@@ -25,7 +10,6 @@ ENV DEBIAN_FRONTEND=noninteractive \
2510
NB_UID=1000 \
2611
HOME=/home/jovyan
2712

28-
USER root
2913
RUN apt-get update \
3014
&& apt-get upgrade -y \
3115
&& apt-get install -y --no-install-recommends \
@@ -39,15 +23,6 @@ RUN apt-get update \
3923
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
4024
&& locale-gen
4125

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-
5126
RUN adduser --disabled-password \
5227
--gecos "Default user" \
5328
--uid ${NB_UID} \
@@ -57,4 +32,11 @@ RUN adduser --disabled-password \
5732

5833
USER $NB_USER
5934

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+
6042
ENTRYPOINT ["tini", "--"]

0 commit comments

Comments
 (0)