1234567891011121314151617181920212223 |
- 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 sudo && \
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab --no-cache-dir && \
- apk del libc-dev libffi-dev gcc
- RUN \
- addgroup notebook &&\
- adduser -Ss /bin/bash -g notebook notebook &&\
- echo "notebook ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
- echo "notebook:123456" | chpasswd &&\
- chown -R notebook:notebook . &&\
- mkdir /data &&\
- chown -R notebook:notebook /data
- EXPOSE 8888
- USER notebook
- CMD ["jupyter", "lab", "--no-browser", "--ip", "\"0.0.0.0\"", "--port", "8888", "--allow-root"]
|