Skip to content

Commit

Permalink
Fix user/group
Browse files Browse the repository at this point in the history
* It's needed for both docker environments
* It's linux specific

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
  • Loading branch information
Ryanf55 authored and Hwurzburg committed Sep 14, 2024
1 parent 33c5dfa commit 1d63008
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
20 changes: 16 additions & 4 deletions common/source/docs/common-wiki-editing-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,30 @@ Setup with Docker

#. Open a command prompt in the root of the ardupilot_wiki repo and build the docker container for the wiki:

.. code-block:: bash
.. tabs::

cd ardupilot_wiki
docker build . -t ardupilot_wiki --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g)
.. group-tab:: Linux

.. code-block:: bash
cd ardupilot_wiki
docker build . -t ardupilot_wiki --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g)
.. group-tab:: Windows

.. code-block:: powershell
cd ardupilot_wiki
docker build . -t ardupilot_wiki
This will build a docker image with all package setup to build the wiki and name it ``ardupilot_wiki``.

#. Use the container to build the wiki with a shared volume to get the build result on your computer:

.. code-block:: bash
docker run --rm -it -v "${PWD}:/ardupilot_wiki" -u "$(id -u):$(id -g)" ardupilot_wiki python3 update.py
docker run --rm -it -v "$(pwd):/ardupilot_wiki" -u "$(id -u):$(id -g)" ardupilot_wiki python3 update.py
#. Alternately, use the bash utility script in the ``ardupilot_wiki`` root directory:

Expand Down
4 changes: 2 additions & 2 deletions dev/source/docs/building-setup-linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ How to Build the Docker Image
Build the docker image and tag it with the name ardupilot:
::

docker build . -t ardupilot
docker build . -t ardupilot --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g)

Run ArduPilot Container
-----------------------
Expand All @@ -194,6 +194,6 @@ the Ardupilot source, and launches an interactive shell inside the container. Fr
you can build Ardupilot:
::

docker run --rm -it -v `pwd`:/ardupilot ardupilot:latest bash
docker run --rm -it -v "$(pwd):/ardupilot" -u "$(id -u):$(id -g)" ardupilot:latest bash


0 comments on commit 1d63008

Please sign in to comment.