From c027c2e978c268422f3a9ac3889ad8987f00b814 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Wed, 10 Apr 2024 20:20:00 +0000 Subject: [PATCH] docker: add usage instructions to BUILD.md --- BUILD.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/BUILD.md b/BUILD.md index 5e11d2c838..4a221bef83 100644 --- a/BUILD.md +++ b/BUILD.md @@ -191,6 +191,27 @@ list some basic and more used commands as example. Also, take a look on the [Advanced section](#advanced-usage) below. +### Using Docker ### + +A docker environment is provided which may be helpful for building in a clean +environment and avoiding modification of the host environment. + +To build the docker image (should only need to be done once), run: + +```bash +docker build --rm -t ardupilot-dev . +``` + +To build inside the container, prefix your `waf` commands, e.g.: + +```bash +docker run --rm -it -v $PWD:/ardupilot ardupilot-dev ./waf configure --board=sitl +docker run --rm -it -v $PWD:/ardupilot ardupilot-dev ./waf copter +``` + +Alternatively, simply run `docker run --rm -it -v $PWD:/ardupilot ardupilot-dev` to +start a `bash` shell in which you can run other commands from this document. + ## Advanced usage ## This section contains some explanations on how the Waf build system works