Skip to content

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

@AndreyMZ

Description

@AndreyMZ

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?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dockerArea: docker container engineA-windows-hostArea: windows (not WSL2) hostsbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions