Skip to content

Commit 788dd8a

Browse files
committed
Minimalize singleuser-sample
1 parent de87855 commit 788dd8a

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

images/singleuser-sample/Dockerfile

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,33 @@ FROM python:3.9-slim-bullseye
33
# VULN_SCAN_TIME=
44

55
ENV DEBIAN_FRONTEND=noninteractive \
6-
LANG=en_US.UTF-8 \
7-
LC_ALL=en_US.UTF-8 \
8-
LANGUAGE=en_US.UTF-8 \
96
NB_USER=jovyan \
107
NB_UID=1000 \
118
HOME=/home/jovyan
129

10+
RUN adduser --disabled-password \
11+
--gecos "Default user" \
12+
--uid ${NB_UID} \
13+
--home ${HOME} \
14+
--force-badname \
15+
${NB_USER}
16+
1317
RUN apt-get update \
1418
&& apt-get upgrade -y \
1519
&& apt-get install -y --no-install-recommends \
1620
ca-certificates \
1721
dnsutils \
1822
git \
19-
locales \
2023
iputils-ping \
2124
tini \
22-
&& rm -rf /var/lib/apt/lists/* \
23-
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
24-
&& locale-gen
25-
26-
RUN adduser --disabled-password \
27-
--gecos "Default user" \
28-
--uid ${NB_UID} \
29-
--home ${HOME} \
30-
--force-badname \
31-
${NB_USER}
32-
33-
USER $NB_USER
25+
&& rm -rf /var/lib/apt/lists/*
3426

3527
COPY requirements.txt /tmp/requirements.txt
3628
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3729

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
30+
WORKDIR ${HOME}
31+
USER ${NB_USER}
4132

33+
EXPOSE 8888
4234
ENTRYPOINT ["tini", "--"]
35+
CMD ["jupyter", "lab"]

0 commit comments

Comments
 (0)