# Jupyter Notebook/Lab
FROM jupyter/scipy-notebook:latest

USER root

# Install additional tools
RUN apt-get update && apt-get install -y \
    git \
    neovim \
    ranger \
    tmux \
    htop \
    tree \
    jq \
    && rm -rf /var/lib/apt/lists/*

# Set up git
RUN git config --global init.defaultBranch main

# start-notebook.py maps jovyan to this shared UID/GID and drops privileges.
# Keep the image root at entrypoint time so that mapping can occur.
ENV NB_UID=1000 \
    NB_GID=1000
USER root

EXPOSE 8888