Commit b89f25d2 authored by Michael Poplavski's avatar Michael Poplavski

Run container as jovyan instead of nobody.

Contribution (c) Copyright IBM Corp. 2016
parent 943e376f
......@@ -9,10 +9,9 @@ USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -yq --no-install-recommends \
wget \
build-essential \
python3-dev \
build-essential \
python3-pip \
libsm6 \
python3-zmq \
&& apt-get clean
......@@ -22,6 +21,14 @@ RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.6.0/tini &
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
......@@ -32,5 +39,5 @@ WORKDIR /tmp
ENTRYPOINT ["tini", "--", "jupyter", "kernelgateway"]
CMD ["--KernelGatewayApp.ip=0.0.0.0"]
#error Permission denied: '/nonexistent' when not running as root or as user nobody
USER root
\ No newline at end of file
# Run container as jovyan
USER jovyan
\ No newline at end of file
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