-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide images with rustup / cargo installed #1516
Comments
A significant problem with this might be the creation of an excessive number of new dockerfiles. Then again, maybe it could be done programatically somehow. |
How does: FROM ghcr.io/cross-rs/{{TARGET}}:latest
ENV PATH="/root/.cargo/bin:$PATH"
RUN curl -fsSL https://sh.rustup.rs | bash -s -- -y --profile minimal
RUN rustup target add {{TARGET}} look? This could probably be used to generate the required dockerfiles. |
No, I don't see why we'd need to generate a bunch of dockerfiles. Instead we could just use a build-arg approach. # Dockerfile.cross-with-cargo
ARG CROSS_IMAGE
ARG TARGET
FROM CROSS_IMAGE
ENV PATH="/root/.cargo/bin:$PATH"
RUN curl -fsSL https://sh.rustup.rs/ | bash -s -- -y --profile minimal
RUN rustup target add $TARGET and then invoke it like hcl would probably be the best solution coupled with #849 however |
That was what my comment originally was, and is what I'm currently using for cross-cargo. I just laser-focused on that for some reason LOL! |
All targets built with ci lives in https://github.com/cross-rs/cross/blob/main/targets.toml, and if integrated in this repos CI the target name would already exist in |
or here also: https://github.com/cross-rs/cross/blob/main/src/docker/provided_images.rs Oh, there's also a unmerged pr to make cross-util give the list: #1240 |
We can, before
cross/.github/workflows/ci.yml
Line 242 in 19be834
also tag and publish an image which has rustup installed, this would help the use case of just wanting an image with cross-compilation tools + rust installed.
related to #1187
The text was updated successfully, but these errors were encountered: