diff --git a/jupyter-restricted-download/Dockerfile b/jupyter-restricted-download/Dockerfile index 8cb236ea..b9912bef 100644 --- a/jupyter-restricted-download/Dockerfile +++ b/jupyter-restricted-download/Dockerfile @@ -54,13 +54,10 @@ RUN jupyter labextension disable @jupyterlab/docmanager-extension:download \ && jupyter labextension disable @jupyterlab/filebrowser-extension:download RUN pip install pandas numpy seaborn scipy matplotlib pyNetLogo SALib boto3 awscli --upgrade - -# RUN pip install PyYAML==5.3.1 --upgrade RUN pip install gen3==4.18.0 --upgrade - RUN pip install jupyter --upgrade - RUN pip uninstall nbconvert --yes + # Create a non-root user for Jupyter without copying /bin or /bin/bash ARG NB_USER=jovyan ARG NB_UID=1000 @@ -69,13 +66,20 @@ RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \ chmod -R u+rwx /home/$NB_USER && \ mkdir -p /home/$NB_USER/pd +# Configure environment +ENV CONDA_DIR=/opt/conda \ + PATH=/usr/local/bin:$PATH \ + SHELL=/bin/bash \ + NB_USER=jovyan \ + NB_UID=1000 \ + HOME=/home/$NB_USER \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + # Expose port 8888 for JupyterLab EXPOSE 8888 -ARG COVID_TOOLS_BRANCH=master -ADD --chown=$NB_USER:users https://raw.githubusercontent.com/uc-cdis/covid19-tools/$COVID_TOOLS_BRANCH/covid19-notebooks/welcome.html /home/$NB_USER/ -RUN touch /home/$NB_USER/welcome.html - # Add local files as late as possible to avoid cache busting COPY start.sh /usr/local/bin/ COPY start-notebook.sh /usr/local/bin/