docs
docs copied to clipboard
Adding some clarity to Rust example Dockerfiles
I tried to follow the Rust Dockerfile examples and had some trouble. These changes would have helped me a lot and so hopefully they can save others some time.
Sorry for the delay! cc @sfackler for content review
(I'm happy to help fix up the formatting to satisfy the CI after content review)
What's the status here. Could we get this merged?
Any updates? I'm having
pretty-os-name: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by pretty-os-name)
pretty-os-name: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by pretty-os-name)
pretty-os-name: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by pretty-os-name)
errors and could not find a solution anywhere on the internet( my dockerfile:
FROM rust:latest as builder
WORKDIR /usr/src/pretty-os-name
COPY . .
RUN cargo install --path .
FROM rust:bullseye
RUN apt-get update && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/pretty-os-name /usr/local/bin/pretty-os-name
CMD ["pretty-os-name"]
@adsick I weonder if you have some version mismatch. In your example, you install with latest (which is bookworm) and then run with bullseye. I bet the default glibc version is different for both. You should try using the same for both.
@LaurentGoderre thanks, bookworm
works, bullseye
does not. glibc
version is a bit old in there.