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

@@ -3,8 +3,6 @@ FROM jupyter/minimal-notebook
MAINTAINER Jupyter Project <jupyter@googlegroups.com>
USER root
# Spark dependencies
ENV APACHE_SPARK_VERSION 1.4.1
RUN apt-get -y update && \
@@ -22,8 +20,6 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF && \
apt-get --no-install-recommends -y --force-yes install mesos=0.22.1-1.0.debian78 && \
apt-get clean
USER jovyan
# Spark and Mesos pointers
ENV SPARK_HOME /usr/local/spark
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip
@@ -52,7 +48,4 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
&& conda clean -yt
RUN $CONDA_DIR/envs/python2/bin/python \
$CONDA_DIR/envs/python2/bin/ipython \
kernelspec install-self --user
# Switch back to root so that supervisord runs under that user
USER root
kernelspec install-self