Skip to content

Commit 518c3d8

Browse files
committed
Create notebook user
1 parent 265ef32 commit 518c3d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ FROM quay.io/unstructured-io/base-images:wolfi-py3.12-slim-latest as base
55
# https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
66
ARG NB_USER=notebook-user
77
ARG NB_UID=1000
8+
ARG NB_GID=100
89
ARG PIP_VERSION
910
ARG PIPELINE_PACKAGE
1011
ARG PYTHON_VERSION="3.12"
1112

13+
USER root
14+
15+
RUN chown -R ${NB_USER}:${NB_GID} ${HOME}
16+
RUN apk add --no-cache shadow
17+
RUN useradd -m -u ${NB_UID} -g ${NB_GID} -s /bin/sh ${NB_USER}
18+
RUN chown -R ${NB_USER}:${NB_GID} ${HOME}
19+
1220
# Set up environment
1321
ENV PYTHON python${PYTHON_VERSION}
1422
ENV PIP ${PYTHON} -m pip

0 commit comments

Comments
 (0)