diff --git a/docs/source/user_guide/installation/install-from-docker.rst b/docs/source/user_guide/installation/install-from-docker.rst index 82f75bebf4..1d49ae8f54 100644 --- a/docs/source/user_guide/installation/install-from-docker.rst +++ b/docs/source/user_guide/installation/install-from-docker.rst @@ -85,6 +85,13 @@ Once you have pulled the Docker image, you can run a Docker container with the P 3. You can execute PyBaMM-related commands, run tests develop & contribute from the container. +.. note:: + + The default user for the container is ``pybamm`` with ``pybamm`` as password. The user belongs to + ``sudoers`` and ``root`` group, so the sudo command can be issued to install additional packages to + the container. After a clean install, ``sudo apt-get update`` should be executed to update the source + list. Additional packages can be installed using ``sudo apt-get install [package_name]``. + Exiting the Docker container ---------------------------- diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 888f5f197d..152c8f01d9 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -3,10 +3,11 @@ FROM continuumio/miniconda3:latest WORKDIR / RUN apt-get update && apt-get -y upgrade -RUN apt-get install -y libopenblas-dev gcc gfortran graphviz git make g++ build-essential cmake pandoc texlive-latex-extra dvipng +RUN apt-get install -y libopenblas-dev gcc gfortran graphviz git make g++ build-essential cmake pandoc texlive-latex-extra dvipng sudo RUN rm -rf /var/lib/apt/lists/* -RUN useradd -m -s /bin/bash pybamm +RUN useradd -m -s /bin/bash pybamm && echo "pybamm:pybamm" | chpasswd && adduser pybamm sudo +RUN usermod -ou 1000 -g 0 pybamm USER pybamm WORKDIR /home/pybamm/