diff --git a/docs/source/intro/run_docker.rst b/docs/source/intro/run_docker.rst
index e65c2388ea..4b2f35885c 100644
--- a/docs/source/intro/run_docker.rst
+++ b/docs/source/intro/run_docker.rst
@@ -25,6 +25,7 @@ This image contains a fully pre-configured AiiDA environment which makes it part
Docker Desktop is available for Windows and Mac and includes everything you need to run Docker on your computer.
It is a virtual machine + Graphical user interface with some extra features like the new extensions.
+
`Docker Desktop `_ is the easiest way to get started with Docker.
You just need to download the installer and follow the instructions.
@@ -32,6 +33,7 @@ This image contains a fully pre-configured AiiDA environment which makes it part
`Colima `_ is a new open-source project that makes it easy to run Docker on MacOS and Linux.
It is a lightweight alternative to Docker Desktop with a focus on simplicity and performance.
+
If you need multiple Docker environments, Colima is the recommended way.
With colima, you can have multiple Docker environments running at the same time, each with its own Docker daemon and resource allocation thus avoiding conflicts.
@@ -119,7 +121,7 @@ Congratulations! You have a working AiiDA environment, you can start using it.
If you use the Docker image for the development or for the production environment, you are likely to need some extra settings to make it work as you expect.
-.. drowpdown:: Copy files from your computer to the container
+.. dropdown:: Copy files from your computer to the container
.. tab-set::
@@ -150,42 +152,87 @@ If you use the Docker image for the development or for the production environmen
.. dropdown:: Persist data across different containers
The lifetime of the data stored in a container is limited to the lifetime of that particular container.
+
If you stop the container (`docker stop` or simply `Ctrl+D` from the container) and start it again, any data you created will persist.
However, if you remove the container, **all data will be removed as well**.
-
+
.. code-block:: console
-
+
$ docker rm aiida-container
-
+
The preferred way to persistently store data is to `create a volume `__.
-
+
.. tab-set::
-
+
.. tab-item:: Docker Desktop
-
+
1. Open Docker Desktop
1. ???
-
+
.. tab-item:: Docker CLI
-
+
To create a simple volume, run:
-
+
.. code-block:: console
-
+
$ docker volume create container-home-data
-
+
Then make sure to mount that volume when the first time launching the aiida container:
-
+
.. parsed-literal::
-
+
$ docker run -it --name aiida-container -v container-home-data:/home/aiida aiidateam/aiida-core:latest bash
-
+
Starting the container with the above command, ensures that any data stored in the ``/home/aiida`` path within the container is stored in the ``conatiner-home-data`` volume and therefore persists even if the container is removed.
-
+
To persistently store the Python packages installed in the container, use `--user` flag when installing packages with pip, the packages will be installed in the ``/home/aiida/.local`` path which is mounted to the ``container-home-data`` volume.
-
+
You can also mount a local directory instead of a volume and to other container paths, please refer to the `Docker documentation `__ for more information.
+.. dropdown:: Backup the container
+
+ To backup the data of AiiDA, you can still follow the instructions in the `Backup and restore `__ section.
+ However, the container provide a more convinient way if you just want to take a snapshot of the data by backup the whole container or the volume mounted to the container.
+
+ This part is adapt from the `Docker documentation `__.
+
+ If you don't have a volume mounted to the container, you can backup the whole container by commit the container to an image:
+
+ .. parsed-literal::
+
+ $ docker container commit aiida-container aiida-container-backup
+
+ The above command will create a new image named ``aiida-container-backup`` which contains all the data and modifications you made in the container.
+
+ Use `docker push` to push the ``aiida-container-backup`` image to a registry if you want to share it with others.
+
+ Alternatively, you can also export the container to a local tarball:
+
+ .. parsed-literal::
+
+ $ docker save -o aiida-container-backup.tar aiida-container-backup
+
+ To restore the container, pull the image or load from the tarball, run:
+
+ .. parsed-literal::
+
+ $ docker load -i aiida-container-backup.tar
+
+ If you used a `named volume `__, you can backup the volume.
+
+ .. tab-set::
+
+ .. tab-item:: Docker Desktop
+
+ Docker Desktop provides a `Volumes Backup & Share extension `__ which allows you to backup and restore volumes effortlessly.
+
+ The extension can be found from the Marketplace in the Docker Desktop GUI.
+ Install the extension and follow the instructions to backup and restore volumes.
+
+ .. tab-item:: Docker CLI
+
+ Please check `Backup, restore, or migrate data volumes `__ for more information.
+
.. button-ref:: intro:get_started:next
:ref-type: ref
:expand: