mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-12 19:10:27 +03:00
fix docker build under windows
This commit is contained in:
parent
2fcb1cb83d
commit
b5734a3a46
2 changed files with 4 additions and 2 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -10,4 +10,4 @@
|
||||||
Makefile text
|
Makefile text
|
||||||
*.bat eol=crlf
|
*.bat eol=crlf
|
||||||
*.txt text
|
*.txt text
|
||||||
*.sh text
|
*.sh text eol=lf
|
||||||
|
|
|
@ -23,12 +23,14 @@ Where `<TARGET>` must be replaced with the name of the target that you want to b
|
||||||
## Windows 10
|
## Windows 10
|
||||||
|
|
||||||
Docker on Windows requires full paths for mounting volumes in `docker run` commands. For example: `c:\Users\pspyc\Documents\Projects\inav` becomes `//c/Users/pspyc/Documents/Projects/inav` .
|
Docker on Windows requires full paths for mounting volumes in `docker run` commands. For example: `c:\Users\pspyc\Documents\Projects\inav` becomes `//c/Users/pspyc/Documents/Projects/inav` .
|
||||||
|
If you are getting error "standard_init_linux.go:219: exec user process caused: no such file or directory", make sure `\cmake\docker.sh` has lf (not crlf) line endings.
|
||||||
|
|
||||||
You'll have to manually execute the same steps that the build script does:
|
You'll have to manually execute the same steps that the build script does:
|
||||||
|
|
||||||
1. `docker build -t inav-build .`
|
1. `docker build -t inav-build .`
|
||||||
+ This step is only needed the first time.
|
+ This step is only needed the first time.
|
||||||
2. `docker run --rm -it -v <PATH_TO_REPO>:/src inav-build <TARGET>`
|
2. `docker run --rm -it -u root -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.
|
+ 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.
|
||||||
|
+ Note that on Windows/WSL 2 mounted /src folder is writeable for root user only. You have to run build under root user. You can achieve this by using `-u root` option in the command line above, or by removing "USER inav" line from the .\DockerFile before building image.
|
||||||
|
|
||||||
Refer to the [Linux](#Linux) instructions or the [build script](/build.sh) for more details.
|
Refer to the [Linux](#Linux) instructions or the [build script](/build.sh) for more details.
|
Loading…
Add table
Add a link
Reference in a new issue