-
Notifications
You must be signed in to change notification settings - Fork 90
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
Alpine missing libc-dev #94
Comments
The Alpine images are significantly more minimal than the standard Debian images - the |
It's good to know that it's a conscious choice to keep the alpine image size down. Would be good to document that somewhere though. Took me a long time to figure out why the builds were broken as most rust alpine examples don't seem to compile c code so I didn't have much reference material to borrow from. Granted this is my first time trying to create a scratch image from Rust, but if it's a common use case others may have the same problem. |
Why? I mean, I want to discuss real foundation of this choice. I bring two use cases as examples. I use
build and tag it with From another image define
A second use case is to build inside the first of 2-stage Dockerfile directly. Ending with a slim image anyway. What I am asking is: there are other real scenario in use? Who is using the rust image for something else than "compile-then-move-away"? An image supposed to be useful for building rust code currently misses also the How much minimal should be? (or should it be really minimal at all?) |
just want to drop my opinion here- yeah, i don't think it being minimal makes sense. rustc is huge. |
yep, I see your point. My comments was meaningless. Sorry. |
I tried building executables using the alpine latest and the build failed unless I added
RUN apk add libc-dev
to my builder image. See https://github.com/misalcedo/kv-store for a sample repo that fails to build. Another one of my repos also failed.The basic hello-world crate does build in this base image.
Looking at the debian-based images we do install libc-dev there. Is there any reason not to include it for Alpine?
I am new to compiling Rust with MUSL, so there may very well be a better way to do this.
The text was updated successfully, but these errors were encountered: