Can't use `dockerfile` to custom env when there's no default image provided by cross
Dirreke opened this issue · 1 comments
Dirreke commented
Describe your issue
I use cross to build for Tier3 target csky-unknown-linux-gnuabiv2hf
and I write a Dockerfile.
I add the following to Cross.toml
[target.csky-unknown-linux-gnuabiv2hf]
dockerfile = "./path/to/docker/dockerfile"
However, when I run cross, it sait that
`cross` does not provide a Docker image for target csky-unknown-linux-gnuabiv2hf, specify a custom image in `Cross.toml`.
If I use the image
in Cross.toml
, I can run it successfully.
[target.csky-unknown-linux-gnuabiv2hf]
image = "csky"
Therefore, I want to know if it is desifned like this or it's a bug.
Which operating system is the host (e.g computer cross is on) running?
- Linux / BSD
What architecture is the host?
- x86_64
What container engine is cross using?
- docker
cross version
cross 0.2.5
Emilgardis commented
Hi! This was fixed recently with #1340
You can also just specify a dummy image, it won't use it unless you use it in the dockerfile
So either use cross which includes #1340 cargo install cross --git https://github.com/cross-rs/cross
or specify
[target.csky-unknown-linux-gnuabiv2hf]
image = "csky-cross"
dockerfile = "./path/to/docker/dockerfile"