diff --git a/minimal-kernel/Dockerfile b/minimal-kernel/Dockerfile index 1c6e7c00..53e65fde 100644 --- a/minimal-kernel/Dockerfile +++ b/minimal-kernel/Dockerfile @@ -9,10 +9,9 @@ USER root ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -yq --no-install-recommends \ wget \ - build-essential \ python3-dev \ + build-essential \ python3-pip \ - libsm6 \ python3-zmq \ && apt-get clean @@ -22,6 +21,14 @@ RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini & mv tini /usr/local/bin/tini && \ chmod +x /usr/local/bin/tini +# Configure environment +ENV SHELL /bin/bash +ENV KG_USER jovyan +ENV KG_UID 1000 + +# Create jovyan user with UID=1000 +RUN useradd -m -s /bin/bash -N -u $KG_UID $KG_USER + # Install Kernel Gateway RUN pip3 install jupyter_kernel_gateway==0.2.0 @@ -32,5 +39,5 @@ WORKDIR /tmp ENTRYPOINT ["tini", "--", "jupyter", "kernelgateway"] CMD ["--KernelGatewayApp.ip=0.0.0.0"] -#error Permission denied: '/nonexistent' when not running as root or as user nobody -USER root \ No newline at end of file +# Run container as jovyan +USER jovyan \ No newline at end of file