Starlight-0208 93b7643e3b Added some Dockerfiles
optimized the directory structure
2023-08-22 15:37:10 +08:00

20 lines
774 B
Docker

FROM python:3-alpine
LABEL maintainer="<author>"
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" ]