Dockerfile 735 B

12345678910111213141516171819202122232425262728293031
  1. FROM python:3.7-slim-buster
  2. # install debian package (datalad-cli etc.)
  3. RUN apt-get update -y \
  4. && apt-get upgrade -y \
  5. && apt-get autoremove -y \
  6. && apt-get install -y netbase \
  7. && apt-get clean \
  8. && rm -rf /var/lib/apt/lists/*
  9. # install the notebook package etc.
  10. RUN pip install --no-cache --upgrade pip \
  11. && pip install --no-cache notebook jupyterlab \
  12. && pip install --no-cache datalad==0.15.4
  13. # create user with a home directory
  14. ARG NB_USER=jovyan
  15. ARG NB_UID=1000
  16. ENV USER ${NB_USER}
  17. ENV HOME /home/${NB_USER}
  18. WORKDIR ${HOME}
  19. COPY . ${HOME}
  20. USER root
  21. RUN chown -R ${NB_UID} ${HOME}
  22. RUN adduser --disabled-password \
  23. --gecos "Default user" \
  24. --uid ${NB_UID} \
  25. ${NB_USER}
  26. USER ${NB_USER}