Commit aefddadd authored by Peter Parente's avatar Peter Parente

Remove build deps from minimal-kernel image

* Remove SHELL env var and leftover USER nobody
* Install wget for tini then immediately uninstall it
* Install build-essentials and python3-dev for tornado speed up
  then immediately uninstall them

(c) Copyright IBM Corp. 2016
parent 404e0942
......@@ -8,21 +8,22 @@ 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-zmq \
&& apt-get clean
# Install Tini
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini && \
RUN apt-get update && \
apt-get install -yq --no-install-recommends wget && \
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
chmod +x /usr/local/bin/tini && \
apt-get remove --purge -y wget && \
apt-get autoremove -y && \
apt-get clean
# Configure environment
ENV SHELL /bin/bash
ENV KG_USER jovyan
ENV KG_UID 1000
......@@ -30,14 +31,18 @@ ENV KG_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
RUN apt-get update && \
apt-get install -yq --no-install-recommends build-essential python3-dev && \
pip3 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
\ No newline at end of file
USER jovyan
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment