FROM python:3-alpine LABEL maintainer="" LABEL version="selfbuilt" WORKDIR /jupyter RUN \ sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\ apk add --no-cache libc-dev libffi-dev gcc && \ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter --no-cache-dir && \ apk del libc-dev libffi-dev gcc RUN \ jupyter notebook --generate-config &&\ mkdir /data &&\ sed -i.bak 's/# c.NotebookApp.ip = .*/c.NotebookApp.ip = '\''0.0.0.0'\''/' /root/.jupyter/jupyter_notebook_config.py && \ sed -i.bak 's/# c.NotebookApp.notebook_dir = .*/c.NotebookApp.notebook_dir = '\''\/data'\''/' /root/.jupyter/jupyter_notebook_config.py EXPOSE 8888 USER root CMD [ "jupyter", "notebook", "--allow-root" ]