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

17 lines
695 B
Docker

FROM ubuntu:22.04
RUN cp /etc/apt/sources.list /etc/apt/sources.list.ori && \
sed -i s@/archive.ubuntu.com/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list && \
sed -i s@/security.ubuntu.com/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list && \
apt clean &&\
mkdir /jupyter &&\
groupadd notebook &&\
useradd -m -s /bin/bash -G notebook notebooks &&\
usermod -aG sudo notebooks &&\
chown -R notebooks:notebook /jupyter
RUN apt update && apt install -y python3 python3-pip
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab
EXPOSE 8888
USER notebooks
CMD ["jupyter", "lab", "--no-browser", "--ip", "\"0.0.0.0\"", "--port", "8888", "--allow-root"]