-
Notifications
You must be signed in to change notification settings - Fork 1
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
Proposed changes #2
Comments
Took care of freezing versions, and bumping to alpine:3.20 |
Done
Well, it is. You can compile to riscv64 with glibc, but that does not really help us. |
No need. This image is not being built using |
If we need anything, then let's add a Makefile rather than some custom script. But do we need anything? We are using the |
Do you mind opening a PR for it? |
I wasn't sure about that. We are building these images to actually run under those platforms. E.g. we are building We might be able to do a multistage, something like: ARG RUST_VERSION=1.80.1
FROM rust:${RUST_VERSION}-alpine3.20 as toolchain
ENV TARGETS="x86_64-unknown-linux-musl aarch64-unknown-linux-musl x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu riscv64gc-unknown-linux-gnu"
RUN rustup target add ${TARGETS}
# needed for cargo-chef and cargo-sbom, as well as many other compilations
RUN apk add musl-dev linux-headers make
FROM --platform=$BUILDPLATFORM rust:1.80.1-alpine3.20 as builder
RUN apk add musl-dev linux-headers make
RUN cargo install [email protected] [email protected]
FROM toolchain
COPY --from=builder /usr/local/cargo/bin/cargo-chef /usr/local/cargo/bin
COPY --from=builder /usr/local/cargo/bin/cargo-sbom /usr/local/cargo/bin That probably is faster, we can try it. For this one, I will open a PR. |
Oh, I meant examples for building rust application in eve |
We cannot. Those downstream application builds need to be with |
Ok, but examples must be updated to support cross compilation. I'll submit a pr |
we can close this one |
Hooray! |
UPDATE: I can confirm 3.20 works. You can use
mikemzed/eve-rust:1.80.1-alpine-3.20
for testingUPDATE 2 no riscv support yet https://github.com/rust-lang/docker-rust/blob/3b6565cd3b0b7c9cb084f07461cb959f7cf77c16/1.80.1/alpine3.20/Dockerfile
cargo install [email protected]
Add either makefile or shell script to build and push the image so we do not need to remember the command line. Maybe useful for testing before CIFROM --platform=$BUILDPLATFORM lf-edge/eve-rust:1.80.1 AS toolchain
Besides, std lib is not available on riscv rust so we cannot compile applications for this architectureMake a note thatbuild.yml
must havenetwork: true
The text was updated successfully, but these errors were encountered: