-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add rust to eve-alpine #4145
Add rust to eve-alpine #4145
Conversation
This failure is the oddest thing. I didn't change anything off of master except those 2 files, but |
bfe01e3
to
75bf293
Compare
Signed-off-by: Avi Deitcher <[email protected]>
75bf293
to
72763f1
Compare
Also, there was a bug in |
OK, now tests pass. |
@deitch what rust version is that? According to best practices the right way to install rust is ti use rustup. Rust package in OS distros serves only one purpose -- build some rust tools in that distro. If your rust project uses rust-toolchain.toml e.g.
I'm pretty sure it will fail to build. Besides, rust toolchain is a cross toolchain. does Alpine package contains all the targets ? |
@rucoder that is a good question. The current version is 1.80.1. This is how we install go as well (see the peer file
Mostly (not entirely) this is how we get tools available. Right now, we only have it in one place, the incoming #4055 interactive-installer, but more are coming. To get it to work, @jsfakian had to install it manually in his package, which is problematic. There are 2 distinct questions going on here:
Your 2 is asking a very valid question, which affects more than just rust. I don't want to slow him down, though. We should get this in, get him unblocked, and if we want to change how we install these tools, let's have that discussion separately. |
@deitch I updated my comment with more questions, did not expect you to answer so fast :) |
@deitch I would just create a separate container e.g. eve-rust, base it on alpine and install all the tools using rustup + cargo-chef . It will simplify later rust version updates without touching eve-alpine. |
@deitch take a look how I build rust code in a container now. It allows caching the dependencie. the first part of the Dockerfile may be used for eve-rust https://github.com/rucoder/eve/blob/rucoder/eve-mon/pkg/monitor/Dockerfile |
@@ -1,6 +1,6 @@ | |||
# image was bootstraped using FROM lfedge/eve-alpine-base:fad44e3702708a8d044663a20fd98d933dddb41e AS cache | |||
# to update please see https://github.com/lf-edge/eve/blob/master/docs/BUILD.md#how-to-update-eve-alpine-package | |||
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS cache | |||
FROM lfedge/eve-alpine:fbf39533415522ac124a2da9a695fda686adedc3 AS cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we update all of the FROM eve-alpine lines to use the same tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go ahead with this. I'm planning on leaving this open, as the eve-rust approach is better. Once that is in, I'll close this.
Converted to a draft, since we are hoping to use github.com/lf-edge/eve-rust as an image. |
to whom it may concern: the repo eve-rust is created https://github.com/lf-edge/eve-rust/ |
@deitch I guess we can close this one |
Agreed. I was waiting for everyone to be inline with the eve-rust approach, but now we can close this one. |
Adds rust from
edge
to eve-alpine, following the instructions in ALPINE.md:eve-alpine
from Docker Hub to befbf39533415522ac124a2da9a695fda686adedc3
FROM
line inpkg/alpine/Dockerfile
to use that tagrust
topkg/alpine/mirrors/edge
Offhand I do not recall if our pipeline automatically pushes out the updated lfedge/eve-alpine once built.