mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 07:22:57 +00:00
Merge pull request #38 from parente/tini-init
Swap tini in for supervisord
This commit is contained in:
@@ -91,4 +91,5 @@ USER root
|
|||||||
# switching at runtime.
|
# switching at runtime.
|
||||||
RUN $CONDA_DIR/envs/python2/bin/python \
|
RUN $CONDA_DIR/envs/python2/bin/python \
|
||||||
$CONDA_DIR/envs/python2/bin/ipython \
|
$CONDA_DIR/envs/python2/bin/ipython \
|
||||||
kernelspec install-self
|
kernelspec install-self
|
||||||
|
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
* Spark 1.4.1 for use in local mode or to connect to a cluster of Spark workers
|
* Spark 1.4.1 for use in local mode or to connect to a cluster of Spark workers
|
||||||
* Mesos client 0.22 binary that can communicate with a Mesos master
|
* Mesos client 0.22 binary that can communicate with a Mesos master
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](../minimal-notebook/start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
@@ -96,4 +96,5 @@ USER root
|
|||||||
# switching at runtime.
|
# switching at runtime.
|
||||||
RUN $CONDA_DIR/envs/python2/bin/python \
|
RUN $CONDA_DIR/envs/python2/bin/python \
|
||||||
$CONDA_DIR/envs/python2/bin/ipython \
|
$CONDA_DIR/envs/python2/bin/ipython \
|
||||||
kernelspec install-self
|
kernelspec install-self
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
* plyr, devtools, dplyr, ggplot2, tidyr, shiny, rmarkdown, forecast, stringr, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest pre-installed
|
* plyr, devtools, dplyr, ggplot2, tidyr, shiny, rmarkdown, forecast, stringr, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest pre-installed
|
||||||
* Julia v0.3.x with Gadfly and RDatasets pre-installed
|
* Julia v0.3.x with Gadfly and RDatasets pre-installed
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](../minimal-notebook/start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
@@ -22,13 +22,19 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
|
|||||||
texlive-latex-extra \
|
texlive-latex-extra \
|
||||||
texlive-fonts-extra \
|
texlive-fonts-extra \
|
||||||
texlive-fonts-recommended \
|
texlive-fonts-recommended \
|
||||||
supervisor \
|
|
||||||
sudo \
|
sudo \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Install Tini
|
||||||
|
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini && \
|
||||||
|
echo "d5ed732199c36a1189320e6c4859f0169e950692f451c03e7854243b95f4234b *tini" | sha256sum -c - && \
|
||||||
|
mv tini /usr/local/bin/tini && \
|
||||||
|
chmod +x /usr/local/bin/tini
|
||||||
|
|
||||||
# Configure environment
|
# Configure environment
|
||||||
ENV CONDA_DIR /opt/conda
|
ENV CONDA_DIR /opt/conda
|
||||||
ENV PATH $CONDA_DIR/bin:$PATH
|
ENV PATH $CONDA_DIR/bin:$PATH
|
||||||
|
ENV SHELL /bin/bash
|
||||||
ENV NB_USER jovyan
|
ENV NB_USER jovyan
|
||||||
ENV NB_UID 1000
|
ENV NB_UID 1000
|
||||||
|
|
||||||
@@ -36,6 +42,7 @@ ENV NB_UID 1000
|
|||||||
RUN mkdir -p $CONDA_DIR && \
|
RUN mkdir -p $CONDA_DIR && \
|
||||||
echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh && \
|
echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh && \
|
||||||
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-3.9.1-Linux-x86_64.sh && \
|
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-3.9.1-Linux-x86_64.sh && \
|
||||||
|
echo "6c6b44acdd0bc4229377ee10d52c8ac6160c336d9cdd669db7371aa9344e1ac3 *Miniconda3-3.9.1-Linux-x86_64.sh" | sha256sum -c - && \
|
||||||
/bin/bash /Miniconda3-3.9.1-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
|
/bin/bash /Miniconda3-3.9.1-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
|
||||||
rm Miniconda3-3.9.1-Linux-x86_64.sh && \
|
rm Miniconda3-3.9.1-Linux-x86_64.sh && \
|
||||||
$CONDA_DIR/bin/conda install --yes conda==3.14.1
|
$CONDA_DIR/bin/conda install --yes conda==3.14.1
|
||||||
@@ -57,10 +64,11 @@ RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
|
|||||||
|
|
||||||
# Configure container startup
|
# Configure container startup
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
CMD [ "start-notebook.sh" ]
|
WORKDIR /home/$NB_USER/work
|
||||||
|
ENTRYPOINT ["tini", "--"]
|
||||||
|
CMD ["start-notebook.sh"]
|
||||||
|
|
||||||
# Add local files as late as possible to avoid cache busting
|
# Add local files as late as possible to avoid cache busting
|
||||||
COPY start-notebook.sh /usr/local/bin/
|
COPY start-notebook.sh /usr/local/bin/
|
||||||
COPY notebook.conf /etc/supervisor/conf.d/
|
|
||||||
COPY jupyter_notebook_config.py /home/$NB_USER/.jupyter/
|
COPY jupyter_notebook_config.py /home/$NB_USER/.jupyter/
|
||||||
RUN chown -R $NB_USER:users /home/$NB_USER/.jupyter
|
RUN chown -R $NB_USER:users /home/$NB_USER/.jupyter
|
@@ -6,6 +6,7 @@
|
|||||||
* Conda Python 3.4.x
|
* Conda Python 3.4.x
|
||||||
* No preinstalled scientific computing packages
|
* No preinstalled scientific computing packages
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](./start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
[program:notebook]
|
|
||||||
user=jovyan
|
|
||||||
umask=0002
|
|
||||||
directory=/home/jovyan/work
|
|
||||||
command=ipython notebook
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
|
||||||
redirect_stderr=true
|
|
||||||
environment=HOME="/home/jovyan",USER="jovyan",SHELL="/bin/bash"
|
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Change UID of jovyan to NB_UID if it does not match
|
# Change UID of NB_USER to NB_UID if it does not match
|
||||||
if [ "$NB_UID" != $(id -u jovyan) ] ; then
|
if [ "$NB_UID" != $(id -u $NB_USER) ] ; then
|
||||||
usermod -u $NB_UID $NB_USER
|
usermod -u $NB_UID $NB_USER
|
||||||
chown -R $NB_UID $CONDA_DIR
|
chown -R $NB_UID $CONDA_DIR
|
||||||
fi
|
fi
|
||||||
@@ -11,5 +11,6 @@ if [ ! -z "$GRANT_SUDO" ]; then
|
|||||||
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
|
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start supervisord in foreground, PID1
|
# Start the notebook server
|
||||||
exec supervisord -n -c /etc/supervisor/supervisord.conf
|
exec su $NB_USER -c "env PATH=$PATH jupyter notebook $@"
|
||||||
|
|
||||||
|
@@ -57,4 +57,5 @@ USER root
|
|||||||
# switching at runtime.
|
# switching at runtime.
|
||||||
RUN $CONDA_DIR/envs/python2/bin/python \
|
RUN $CONDA_DIR/envs/python2/bin/python \
|
||||||
$CONDA_DIR/envs/python2/bin/ipython \
|
$CONDA_DIR/envs/python2/bin/ipython \
|
||||||
kernelspec install-self
|
kernelspec install-self
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
* Spark 1.4.1 for use in local mode or to connect to a cluster of Spark workers
|
* Spark 1.4.1 for use in local mode or to connect to a cluster of Spark workers
|
||||||
* Mesos client 0.22 binary that can communicate with a Mesos master
|
* Mesos client 0.22 binary that can communicate with a Mesos master
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](../minimal-notebook/start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
* Conda R v3.2.x and channel
|
* Conda R v3.2.x and channel
|
||||||
* plyr, devtools, dplyr, ggplot2, tidyr, shiny, rmarkdown, forecast, stringr, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest pre-installed
|
* plyr, devtools, dplyr, ggplot2, tidyr, shiny, rmarkdown, forecast, stringr, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest pre-installed
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](../minimal-notebook/start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
@@ -52,3 +52,4 @@ USER root
|
|||||||
RUN $CONDA_DIR/envs/python2/bin/python \
|
RUN $CONDA_DIR/envs/python2/bin/python \
|
||||||
$CONDA_DIR/envs/python2/bin/ipython \
|
$CONDA_DIR/envs/python2/bin/ipython \
|
||||||
kernelspec install-self
|
kernelspec install-self
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
* Conda Python 3.4.x and Python 2.7.x environments
|
* Conda Python 3.4.x and Python 2.7.x environments
|
||||||
* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh pre-installed
|
* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh pre-installed
|
||||||
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
* Unprivileged user `jovyan` (uid=1000, configurable, see options) in group `users` (gid=100) with ownership over `/home/jovyan` and `/opt/conda`
|
||||||
|
* [tini](https://github.com/krallin/tini) as the container entrypoint and [start-notebook.sh](../minimal-notebook/start-notebook.sh) as the default command
|
||||||
* Options for HTTPS, password auth, and passwordless `sudo`
|
* Options for HTTPS, password auth, and passwordless `sudo`
|
||||||
|
|
||||||
## Basic Use
|
## Basic Use
|
||||||
|
Reference in New Issue
Block a user