Skip to content

Commit 259fcd8

Browse files
committed
pass dummy user/group 1000 on windows host
1 parent 3a98eb3 commit 259fcd8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ RUN pip install pyyaml
1414
RUN addgroup --gid $GROUP_ID inav; exit 0;
1515
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID inav; exit 0;
1616

17-
ARG INAV_IMAGE_USER=inav
18-
USER $INAV_IMAGE_USER
17+
USER inav
1918

2019
RUN git config --global --add safe.directory /src
2120

docs/development/Building in Docker.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ If you are getting error "standard_init_linux.go:219: exec user process caused:
3333

3434
You'll have to manually execute the same steps that the build script does:
3535

36-
1. `docker build --build-arg INAV_IMAGE_USER=root -t inav-build .`
36+
1. `docker build --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 -t inav-build .`
3737
+ This step is only needed the first time.
38-
+ 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.
3938
+ If GDB should be installed in the image, add argument '--build-arg GDB=yes'
4039
2. `docker run --rm -it -v <PATH_TO_REPO>:/src inav-build <TARGET>`
4140
+ Where `<PATH_TO_REPO>` must be replaced with the absolute path of where you cloned this repo (see above), and `<TARGET>` with the name of the target that you want to build.

0 commit comments

Comments
 (0)