mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 13:32:56 +00:00
Make subimages compatible with late user creation
* Always remain as root during install * Put kernel specs in system path, not user home * Create user work directory at startup * Note this is in 4.0 and up images, not 3.2 Contribution (c) Copyright IBM Corp. 2015
This commit is contained in:
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
|
||||
sudo \
|
||||
&& apt-get clean
|
||||
|
||||
# Configure docker environment
|
||||
ENV CONDA_DIR /opt/conda
|
||||
ENV NB_USER jovyan
|
||||
ENV WORK /home/$NB_USER/work
|
||||
ENV PATH $CONDA_DIR/bin:$PATH
|
||||
|
||||
# Install conda
|
||||
RUN echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh && \
|
||||
@@ -34,14 +37,6 @@ RUN echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh && \
|
||||
rm Miniconda3-3.9.1-Linux-x86_64.sh && \
|
||||
$CONDA_DIR/bin/conda install --yes conda==3.14.1
|
||||
|
||||
# Configure docker environment
|
||||
ENV PATH $CONDA_DIR/bin:$PATH
|
||||
|
||||
# Setup a work directory rooted in home for ease of volume mounting
|
||||
ENV WORK /notebooks
|
||||
RUN mkdir -p $WORK && chown root.users $WORK && chmod g+w $WORK
|
||||
WORKDIR $WORK
|
||||
|
||||
# Install Jupyter notebook
|
||||
RUN conda install --yes \
|
||||
'notebook=4.0*' \
|
||||
|
Reference in New Issue
Block a user