added adduser command to Jupyter Python image
All checks were successful
CI / Build Jupyter python Docker images (push) Successful in 38m18s

This commit is contained in:
2025-08-14 14:05:58 +08:00
parent a3e83bf911
commit 08952e074e

View File

@@ -2,7 +2,7 @@ FROM debian:stable AS build
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update &&\ apt update &&\
apt install -y python3 python3-dev pipx gcc g++ libffi-dev cargo cmake autoconf swig ninja-build patchelf meson python3-faiss apt install -y python3 python3-dev pipx gcc g++ libffi-dev cargo cmake autoconf swig ninja-build patchelf meson python3-faiss adduser
RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan
USER jovyan USER jovyan
WORKDIR /home/jovyan WORKDIR /home/jovyan
@@ -29,7 +29,7 @@ FROM debian:stable
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update &&\ apt update &&\
apt install -y python3 apt install -y python3 adduser
RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan
USER jovyan USER jovyan
COPY --from=build /home/jovyan /home/jovyan COPY --from=build /home/jovyan /home/jovyan