cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.49k stars 365 forks source link

`docker: invalid spec: [...] too many colons` when run cross in Docker on Windows #1338

Open AndreyMZ opened 11 months ago

AndreyMZ commented 11 months ago

Checklist

Describe your issue

I am on Windows and I am trying to run cross from inside a Docker container as it is documented in https://github.com/cross-rs/cross#docker-in-docker. This results in an error like:

docker: invalid spec: C:\projects\hello_world/:/app/C:\projects\hello_world/:z: too many colons.

What target(s) are you cross-compiling for?

No response

Which operating system is the host (e.g computer cross is on) running?

What architecture is the host?

What container engine is cross using?

cross version

cross 0.2.5

Example

cargo new hello_world --bin
cd .\hello_world\
docker run -v /var/run/docker.sock:/var/run/docker.sock -v .:/app -w /app -it ghcr.io/cross-rs/cross:edge cross build

Actual result

PS C:\projects> cargo new hello_world --bin
     Created binary (application) `hello_world` package
PS C:\projects> cd .\hello_world\
PS C:\projects\hello_world> docker run -v /var/run/docker.sock:/var/run/docker.sock -v .:/app -w /app -it ghcr.io/cross-rs/cross:edge cross build
info: downloading component 'rust-src'
info: installing component 'rust-src'
docker: invalid spec: C:\projects\hello_world/:/app/C:\projects\hello_world/:z: too many colons.
See 'docker run --help'.

Additional information / notes

No response