Closed fuzzypixelz closed 5 months ago
How would you use this? E.g what is the mechanism that switches base image? Does this only apply to our build-docker-image
We already have https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#custom-image
How would you use this? E.g what is the mechanism that switches base image? Does this only apply to our
build-docker-image
We already have https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#custom-image
I meant exposing the base image as a build argument:
ARG BASE=ubuntu-20.04
FROM ${BASE}
# ...
Alas this wouldn't work if I try to override it when using cross images themselves as a base image.
My goal is getting cross images based on Ubuntu 16.04 (to support older versions of glibc). I tried to simply change it in the Dockerfiles and run cargo xtask build-docker-image x86_64-unknown-linux-gnu
but that expectedly failed with Unable to locate package libgcc-s1:amd64
. Who knows what other things will go wrong there.
I see, I don't think we'd be able to support this without many small fixes in many places, and 16.04 is not really maintained anymore. We will (eventually, far future) be merging all the pre-setup stuff into one base image, which would maybe help with your effort. See https://github.com/cross-rs/cross/pull/953
I'll close this issue as it's not something we want to do, if you want to have older glibc I'd recommend you to look into crosstool-ng, which we can use to support older libraries. There's no documentation about how to do it but see cargo xtask configure-crosstool
and one of the targets which uses that
I see, I don't think we'd be able to support this without many small fixes in many places, and 16.04 is not really maintained anymore. We will (eventually, far future) be merging all the pre-setup stuff into one base image, which would maybe help with your effort. See #953
I'll close this issue as it's not something we want to do, if you want to have older glibc I'd recommend you to look into crosstool-ng, which we can use to support older libraries. There's no documentation about how to do it but see
cargo xtask configure-crosstool
and one of the targets which uses that
Thanks a lot! I'll look into the crosstool-ng option once I have the time and report my findings.
Oh yeah! I forgot about zig also which is the obvious way to do it :)
https://github.com/cross-rs/cross/blob/main/docs/config_file.md#targettargetzig
Checklist
Describe your request
Is it reasonable to make the Docker images accept a
$BASE_IMAGE
argument that a user can override to something like ubuntu-16.04 (e.g. for compatibility with systems that require older versions of glibc).Describe why this would be a good inclusion for
cross
No response