Skip to content
Commits on Source (2)
FROM base
MAINTAINER Stefano Alberto Russo <stefano.russo@inaf.it>
# Switch to root
USER root
#------------------------
# Install Jupyter
#------------------------
# Curl
RUN apt-get install curl -y
# Install get-pip script
RUN curl -O https://bootstrap.pypa.io/get-pip.py
# Install Python3 and Pip3
RUN apt-get install python3 python3-distutils -y
RUN python3 get-pip.py #-c <(echo 'pip==20.2')
# Python-tk required by matplotlib/six
RUN apt-get install python-tk python3-tk python3-dev build-essential -y
# Install Jupyter and Sphinx for docs
RUN pip3 install notebook==5.7.10
#------------------------
# Post-intall
#------------------------
# Fix home permissions
RUN chmod 777 /home
# Set entrypoint command
COPY files/entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod 755 /usr/bin/entrypoint.sh
ENV DEFAULT_ENTRYPOINT_COMMAND="/usr/bin/entrypoint.sh"
# Set user
USER metauser
# Set container name
ENV CONTAINER_NAME='jupyternotebook'
#!/bin/bash
docker build . -t jupyternotebook
#/bin/bash
# Set port
if [ "x$BASE_PORT" == "x" ]; then
BASE_PORT=8888
echo "[INFO] using default Notebook server port (8888)"
else
echo "[INFO] Setting Notebook server port to $BASE_PORT"
fi
# Set password
if [ "x$AUTH_PASS" == "x" ]; then
echo "[INFO] Not using anyNotebook server password"
else
echo "[INFO] Setting Notebook server password to $AUTH_PASS"
fi
# Create Notebooks dir if not existent
mkdir -p /home/metauser/notebooks
# Run the Jupyter Notebook server. Use --allow-root if need to run as root.
exec jupyter notebook --ip=0.0.0.0 --port=$BASE_PORT --no-browser --NotebookApp.token=$AUTH_PASS --NotebookApp.notebook_dir='/home/metauser/notebooks'
#!/bin/bash
docker run -v$PWD/:/data -p8881:8881 -eBASE_PORT=8881 -eAAUTH_PASS=testpass -it jupyternotebook
#!/bin/bash
cd base && ./build.sh && cd ..
cd SSH && ./build.sh && cd ..
cd XCalc && ./build.sh && cd ..
cd X11web && ./build.sh && cd ..
cd MinimalDesktop && ./build.sh && cd ..
cd BasicDesktop && ./build.sh && cd ..
cd JupyterNotebook && ./build.sh && cd ..