Skip to content

Commit

Permalink
pass dummy user/group 1000 on windows host
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanLut committed Feb 6, 2024
1 parent 3a98eb3 commit 259fcd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions docs/development/Building in Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <PATH_TO_REPO>:/src inav-build <TARGET>`
+ 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.
Expand Down

0 comments on commit 259fcd8

Please sign in to comment.