docs icon indicating copy to clipboard operation
docs copied to clipboard

Adding some clarity to Rust example Dockerfiles

Open skrapi opened this issue 4 years ago • 5 comments

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.

skrapi avatar May 01 '20 12:05 skrapi

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)

tianon avatar Jun 19 '20 21:06 tianon

What's the status here. Could we get this merged?

s0lst1ce avatar Aug 12 '23 16:08 s0lst1ce

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 avatar Nov 03 '23 10:11 adsick

@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 avatar Nov 03 '23 15:11 LaurentGoderre

@LaurentGoderre thanks, bookworm works, bullseye does not. glibc version is a bit old in there.

adsick avatar Nov 03 '23 15:11 adsick