`docker: invalid spec: [...] too many colons` when run cross in Docker on Windows
AndreyMZ opened this issue · 0 comments
AndreyMZ commented
Checklist
- I've looked through the issues and pull requests for similar reports
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?
- macOS
- Windows
- Linux / BSD
- other OS (specify in description)
What architecture is the host?
- x86_64 / AMD64
- arm32
- arm64 (including Mac M1)
What container engine is cross using?
- docker
- podman
- other container engine (specify in description)
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