From 259fcd8b2187d5f421287b13fc166e0babe0e21f Mon Sep 17 00:00:00 2001 From: Roman Lut <11955117+RomanLut@users.noreply.github.com> Date: Wed, 7 Feb 2024 00:07:42 +0100 Subject: [PATCH] pass dummy user/group 1000 on windows host --- Dockerfile | 3 +-- docs/development/Building in Docker.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7aa633f273..4d2c144f57d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,7 @@ RUN pip install pyyaml RUN addgroup --gid $GROUP_ID inav; exit 0; RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID inav; exit 0; -ARG INAV_IMAGE_USER=inav -USER $INAV_IMAGE_USER +USER inav RUN git config --global --add safe.directory /src diff --git a/docs/development/Building in Docker.md b/docs/development/Building in Docker.md index 21db47a8587..575614a95d1 100755 --- a/docs/development/Building in Docker.md +++ b/docs/development/Building in Docker.md @@ -33,9 +33,8 @@ If you are getting error "standard_init_linux.go:219: exec user process caused: You'll have to manually execute the same steps that the build script does: -1. `docker build --build-arg INAV_IMAGE_USER=root -t inav-build .` +1. `docker build --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 -t inav-build .` + This step is only needed the first time. - + Note that on Windows/WSL 2 mounted /src folder is writeable for root user only. You have to run build under root user. This is achieved with `--build-arg INAV_IMAGE_USER=root` option in the command line above. + If GDB should be installed in the image, add argument '--build-arg GDB=yes' 2. `docker run --rm -it -v :/src inav-build ` + Where `` must be replaced with the absolute path of where you cloned this repo (see above), and `` with the name of the target that you want to build.