From d66d5be446fbe42338d24912010eb182c439c8fe Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Tue, 17 Dec 2024 16:24:17 +0100
Subject: [PATCH] Use content tabs on container usage doc (#433)

podman/sudo docker
Rename file
---
 docs/blog/posts/v0.10.0.md    |   2 +-
 docs/blog/posts/v0.10.0rc.md  |   2 +-
 docs/blog/posts/v0.11.0rc0.md |   2 +-
 docs/container_usage.md       | 110 ++++++++++++++++++++++++++++++++++
 docs/docker.md                |  68 ---------------------
 mkdocs.yml                    |   2 +-
 6 files changed, 114 insertions(+), 72 deletions(-)
 create mode 100644 docs/container_usage.md
 delete mode 100644 docs/docker.md

diff --git a/docs/blog/posts/v0.10.0.md b/docs/blog/posts/v0.10.0.md
index 3727c3bf..1d938e21 100644
--- a/docs/blog/posts/v0.10.0.md
+++ b/docs/blog/posts/v0.10.0.md
@@ -104,7 +104,7 @@ If you missed DeathReaper crowdfunding completion, you can check this [message](
 
 The automated generation of Silkaj Docker images has been implemented in the first place to distribute DeathReaper.
 This is a new way to install Silkaj and its environment. This is convenient to distribute non-stable releases.
-You can find the [documentation on how to use these images](/docker).
+You can find the [documentation on how to use these images](/container_usage).
 
 ## Network
 
diff --git a/docs/blog/posts/v0.10.0rc.md b/docs/blog/posts/v0.10.0rc.md
index dae02ae1..3d69dd9d 100644
--- a/docs/blog/posts/v0.10.0rc.md
+++ b/docs/blog/posts/v0.10.0rc.md
@@ -24,7 +24,7 @@ To install the Python package, run following command:
 pip3 install silkaj --user --upgrade --pre
 ```
 
-To [install and run Silkaj from the Docker image](/docker):
+To [install and run Silkaj from a container](/container_usage):
 
 ```
 sudo docker pull registry.duniter.org/clients/python/silkaj/release/pip:v0.10.0rc0
diff --git a/docs/blog/posts/v0.11.0rc0.md b/docs/blog/posts/v0.11.0rc0.md
index eace4904..4974a34d 100644
--- a/docs/blog/posts/v0.11.0rc0.md
+++ b/docs/blog/posts/v0.11.0rc0.md
@@ -29,7 +29,7 @@ sudo apt install pipx
 pipx install --pip-args "\--pre" silkaj
 ```
 
-To [install and run Silkaj from the Docker image](/docker):
+To [install and run Silkaj from the container](/container_usage):
 
 ```
 sudo docker pull registry.duniter.org/clients/python/silkaj/release/pip:v0.11.0rc0
diff --git a/docs/container_usage.md b/docs/container_usage.md
new file mode 100644
index 00000000..f1d0bd73
--- /dev/null
+++ b/docs/container_usage.md
@@ -0,0 +1,110 @@
+There are two kind of containers. The one built with `pip` for user purposes, and the one built with Poetry for developer purposes.
+
+We recommand using `podman` instead of `docker` command for not having to run the command as `root`.
+
+In case you use `docker`, you can [add your user into the `docker` group, so you can manipulate `docker` executable without `root` permissions](https://askubuntu.com/a/739861).
+
+#### User
+
+Pull the image:
+
+=== "Podman"
+    ```
+    podman pull registry.duniter.org/clients/python/silkaj/release/pip:latest
+    ```
+
+=== "Docker"
+    ```
+    sudo docker pull registry.duniter.org/clients/python/silkaj/release/pip:latest
+    ```
+
+Run Silkaj from outside the image:
+
+=== "Podman"
+    ```
+    podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest silkaj info
+    ```
+
+=== "Docker"
+    ```
+    sudo docker run -it registry.duniter.org/clients/python/silkaj/release/pip:latest silkaj info
+    ```
+
+Go into the image:
+
+=== "Podman"
+    ```
+    podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest bash
+    ```
+
+=== "Docker"
+    ```
+    sudo docker run -it registry.duniter.org/clients/python/silkaj/release/pip:latest bash
+    ```
+
+Then run Silkaj:
+
+```
+silkaj info
+```
+
+The working directory is where Silkaj sources are installed in Python `site-packages`.
+This is fine for doing small editions. For bigger editions, it is adviced to use a development environment with Poetry.
+
+#### Developer
+
+`git` is installed, so it can be used as a development environment.
+
+Pull the image:
+
+=== "Podman"
+    ```
+    podman pull registry.duniter.org/clients/python/silkaj/release/poetry:latest
+    ```
+
+=== "Docker"
+    ```
+    sudo docker pull registry.duniter.org/clients/python/silkaj/release/poetry:latest
+    ```
+
+Run Silkaj from ouside the image:
+
+=== "Podman"
+    ```
+    podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest silkaj info
+    ```
+
+=== "Docker"
+    ```
+    sudo docker run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest silkaj info
+    ```
+
+Go into the image:
+
+=== "Podman"
+    ```
+    podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest bash
+    ```
+
+=== "Docker"
+    ```
+    sudo docker run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest bash
+    ```
+
+Then run Silkaj:
+
+```
+silkaj info
+```
+
+The working directory contains Silkaj sources. Set up the repository to have it ready for developments:
+
+```bash
+git checkout dev
+git remote set-url origin https://git@git.duniter.org/clients/python/silkaj.git
+```
+
+```bash
+git config --global user.email "you@example.com"
+git config --global user.name "Your Name"
+```
diff --git a/docs/docker.md b/docs/docker.md
deleted file mode 100644
index 51cda1de..00000000
--- a/docs/docker.md
+++ /dev/null
@@ -1,68 +0,0 @@
-### Docker images
-
-There are two kind of images. The one built with `pip` for user purposes, and the one built with Poetry for developer purposes.
-
-We are using `podman` instead of `docker` command for not having to run the command as `root`.
-
-In case you use `docker`, you can [add your user into the `docker` group, so you can manipulate `docker` executable without `root` permissions](https://askubuntu.com/a/739861).
-
-Feel free to replace `podman` with `sudo docker`.
-
-#### User
-
-Pull the image:
-
-```bash
-podman pull registry.duniter.org/clients/python/silkaj/release/pip:latest
-```
-
-Run Silkaj from outside the image:
-
-```bash
-podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest silkaj info
-```
-
-Go into the image, then run Silkaj:
-
-```bash
-podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest bash
-silkaj info
-```
-
-The working directory is where Silkaj sources are installed in Python `site-packages`.
-This is fine for doing small editions. For bigger editions, it is adviced to use a development environment with Poetry.
-
-#### Developer
-
-`git` is installed, so it can be used as a development environment.
-
-Pull the image:
-
-```bash
-podman pull registry.duniter.org/clients/python/silkaj/release/poetry:latest
-```
-
-Run Silkaj from ouside the image:
-
-```bash
-podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest silkaj info
-```
-
-Go into the image, then run Silkaj:
-
-```bash
-podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest bash
-silkaj info
-```
-
-The working directory contains Silkaj sources. Set up the repository to have it ready for developments:
-
-```bash
-git checkout dev
-git remote set-url origin https://git@git.duniter.org/clients/python/silkaj.git
-```
-
-```bash
-git config --global user.email "you@example.com"
-git config --global user.name "Your Name"
-```
diff --git a/mkdocs.yml b/mkdocs.yml
index 51560392..10d2c51f 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -57,7 +57,7 @@ nav:
   - Contributing:
     - contributing.md
     - Poetry installation: install_poetry.md
-    - Docker installation: docker.md
+    - Container usage: container_usage.md
     - Documentation: documentation.md
     - Testing: testing.md
     - Coverage report: coverage.md
-- 
GitLab