Mention how to run the script and keep the same UID, podman and docker use a
little bit different arguments for that. While on it also fix the -v parameter
for docker which, on some machines, only accepts absolute paths.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
ci/README.rst | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ci/README.rst b/ci/README.rst
index 752d8fe46410..9f9a91ed2771 100644
--- a/ci/README.rst
+++ b/ci/README.rst
@@ -57,13 +57,21 @@ this case from the root of the repository:
.. code-block:: shell
- podman run -it --rm -v .:/repo:z -w /repo libnbd-fedora-rawhide bash
+ podman run -it --rm --userns=keep-id -v .:/repo:z -w /repo libnbd-fedora-rawhide
bash
+
+or
+
+.. code-block:: shell
+
+ docker run -it --rm --user $UID:$UID -v $PWD:/repo:z -w /repo libnbd-fedora-rawhide
bash
which will bind-mount the current directory (root of the repository in our case)
onto /repo inside the container and also use that path as the working directory
(just so you do not have to ``cd /repo`` before any commands. This example
illustrates running bash, which can be used to debug any issues in the build,
-but any command can be specified, for example the build script directly.
+but any command can be specified, for example the build script directly. It
+also runs the command under a user with the same UID as the user running the
+command (even with the same UID).
Since the directory is bind-mounted any changes will be visible in your local
repository and vice versa. That is useful when you want to, for example, make a
--
2.32.0