Open TudbuT opened 1 year ago
Can you check the output of docker buildx
? With container engines, the flags have higher priority than the subcommands, so something like docker x --platform
will produce an error unknown flag: --platform
when the subcommand x
doesn't exist. In this case, if BuildKit isn't present and therefore no buildx
, the error with the platform flag is the first to show up.
If BuildKit is not available, we provide an environment variable CROSS_CONTAINER_ENGINE_NO_BUILDKIT to avoid using buildx build
, only build
, when building Docker images. In this case:
$ CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1 sudo cargo build-docker-image x86_64-pc-windows-msvc-cross --tag local
another solution is vim ~/.docker/config.json, add a line
{
"experimental": "enabled",
...
},
and run a command as docker buildx install
Oh, sorry. I forgot about this issue. Will provide log output shortly.
I had this same issue and solved it by installing docker from the official source. Ubuntu packages docker without BuildKit (buildx).
Shell output:
Docker version (most recent stable at the time of making this issue):
Rust version (most recent stable at the time of making this issue):
Error: 0:
docker buildx build --platform linux/amd64 --build-arg 'CROSS_TARGET_TRIPLE=X86_64_PC_WINDOWS_MSVC_CROSS' --load --pull --cache-from 'type=registry,ref=ghcr.io/cross-rs/x86_64-pc-windows-msvc-cross:main' --tag ghcr.io/cross-rs/x86_64-pc-windows-msvc-cross:local --label 'org.cross-rs.for-cross-target=x86_64-pc-windows-msvc-cross' --label 'org.cross-rs.runs-with=x86_64-unknown-linux-gnu' -f /run/media/tudbut/a5187034-7bde-48cd-b51f-9957d531c89a/cross/docker/cross-toolchains/docker/Dockerfile.x86_64-pc-windows-msvc-cross --progress auto .
failed with exit status: 125