Skip to content

Commit

Permalink
Merge pull request jupyter#102 from parente/more-minimal-kernel
Browse files Browse the repository at this point in the history
Remove build deps from minimal-kernel image
  • Loading branch information
rgbkrk committed Jan 15, 2016
2 parents 404e094 + 05d6ae4 commit 9cb6443
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions minimal-kernel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,42 @@ USER root
# Install all OS dependencies for fully functional notebook server
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -yq --no-install-recommends \
wget \
python3-dev \
build-essential \
python3-pip \
python3-setuptools \
python3-zmq \
&& apt-get clean

# Install Tini
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini && \
RUN python3 -c 'from urllib.request import urlretrieve; \
urlretrieve("https://github.com/krallin/tini/releases/download/v0.6.0/tini", "tini")' && \
echo "d5ed732199c36a1189320e6c4859f0169e950692f451c03e7854243b95f4234b *tini" | sha256sum -c - && \
mv tini /usr/local/bin/tini && \
chmod +x /usr/local/bin/tini

# Configure environment
ENV SHELL /bin/bash
ENV KG_USER jovyan
ENV KG_UID 1000

# Create jovyan user with UID=1000
RUN useradd -m -s /bin/bash -N -u $KG_UID $KG_USER

# Install Kernel Gateway
RUN pip3 install jupyter_kernel_gateway==0.2.0
# Install modern pip then kernel gateway
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
build-essential \
python3-dev && \
easy_install3 pip && \
pip install jupyter_kernel_gateway==0.2.0 && \
apt-get remove --purge -y \
build-essential \
python3-dev && \
apt-get autoremove -y && \
apt-get clean

# Configure container startup
USER nobody
EXPOSE 8888
WORKDIR /tmp
ENTRYPOINT ["tini", "--", "jupyter", "kernelgateway"]
CMD ["--KernelGatewayApp.ip=0.0.0.0"]

# Run container as jovyan
USER jovyan
USER jovyan

0 comments on commit 9cb6443

Please sign in to comment.