mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 13:32:56 +00:00
More minimal, faster build
* Use setuptools to get modern pip (debian packaged pip stops working after requests gets updated) * Don't use wget to fetch tini, use Python! (c) Copyright IBM Corp. 2016
This commit is contained in:
@@ -8,20 +8,15 @@ USER root
|
|||||||
# Install all OS dependencies for fully functional notebook server
|
# Install all OS dependencies for fully functional notebook server
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
RUN apt-get update && apt-get install -yq --no-install-recommends \
|
RUN apt-get update && apt-get install -yq --no-install-recommends \
|
||||||
python3-pip \
|
|
||||||
python3-zmq \
|
python3-zmq \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Install Tini
|
# Install Tini
|
||||||
RUN apt-get update && \
|
RUN python3 -c 'from urllib.request import urlretrieve; \
|
||||||
apt-get install -yq --no-install-recommends wget && \
|
urlretrieve("https://github.com/krallin/tini/releases/download/v0.6.0/tini", "tini")' && \
|
||||||
wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini && \
|
|
||||||
echo "d5ed732199c36a1189320e6c4859f0169e950692f451c03e7854243b95f4234b *tini" | sha256sum -c - && \
|
echo "d5ed732199c36a1189320e6c4859f0169e950692f451c03e7854243b95f4234b *tini" | sha256sum -c - && \
|
||||||
mv tini /usr/local/bin/tini && \
|
mv tini /usr/local/bin/tini && \
|
||||||
chmod +x /usr/local/bin/tini && \
|
chmod +x /usr/local/bin/tini
|
||||||
apt-get remove --purge -y wget && \
|
|
||||||
apt-get autoremove -y && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
# Configure environment
|
# Configure environment
|
||||||
ENV KG_USER jovyan
|
ENV KG_USER jovyan
|
||||||
@@ -30,11 +25,18 @@ ENV KG_UID 1000
|
|||||||
# Create jovyan user with UID=1000
|
# Create jovyan user with UID=1000
|
||||||
RUN useradd -m -s /bin/bash -N -u $KG_UID $KG_USER
|
RUN useradd -m -s /bin/bash -N -u $KG_UID $KG_USER
|
||||||
|
|
||||||
# Install Kernel Gateway
|
# Install modern pip then kernel gateway
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -yq --no-install-recommends build-essential python3-dev && \
|
apt-get install -yq --no-install-recommends \
|
||||||
pip3 install jupyter_kernel_gateway==0.2.0 && \
|
build-essential \
|
||||||
apt-get remove --purge -y build-essential python3-dev && \
|
python3-dev \
|
||||||
|
python3-setuptools && \
|
||||||
|
easy_install3 pip && \
|
||||||
|
pip install jupyter_kernel_gateway==0.2.0 && \
|
||||||
|
apt-get remove --purge -y \
|
||||||
|
build-essential \
|
||||||
|
python3-dev \
|
||||||
|
python3-setuptools && \
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user