fix: JupyterHub Dockerfile - add eric user, sudo, fix DB path (4 slashes)

This commit is contained in:
Eric FELIXINE
2026-06-01 10:26:47 -04:00
parent 9e933fea66
commit cb45b89f1f
16 changed files with 828 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ FROM jupyterhub/jupyterhub:5.3.0
USER root
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends git sudo && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir \
git+https://github.com/jupyterhub/nativeauthenticator.git@main \
@@ -12,9 +12,17 @@ RUN pip install --no-cache-dir \
jupyterlab \
notebook
# Create eric user with password-less sudo
RUN useradd -m -s /bin/bash -u 1000 eric && \
echo "eric ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
chown -R eric:eric /home/eric
# Create the directory for JupyterHub data
RUN mkdir -p /srv/jupyterhub && chown -R 1000:1000 /srv/jupyterhub
ARG BUILD_DATE=unknown
RUN echo "Build date: ${BUILD_DATE}" > /tmp/build-info.txt
COPY jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py
WORKDIR /srv/jupyterhub