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 &&\ echo 'notebooks:123456' | chpasswd &&\ chown -R notebooks:notebook /jupyter RUN apt update && apt install -y python3 python3-pip sudo 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"]