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:
Peter Parente
2015-08-28 22:38:13 -04:00
parent 30932a3b12
commit c4616560cf
13 changed files with 21 additions and 45 deletions

View File

@@ -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*' \