File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88# TODO: dockerfile 1.7 syntax allows specifying --exclude for COPY, so the same can be done
99# without an additional stage. But at the moment of writing this it's still experimental.
1010# Switch to using it when it becomes stable.
11- FROM rust as source
11+
12+ # Note: the base image here doesn't really matter, we just use the same one as in the "builder"
13+ # stage below.
14+ FROM rust :bookworm as source
1215COPY . /src
1316RUN rm -r /src/build -tools
1417
15- FROM rust AS builder
18+ # Note: the builder image should use the same or an older distro compared to the runner images,
19+ # so that its GLIBC version is also the same or older. Otherwise the built executables have
20+ # a chance to get a dependency on a newer version of some GLIBC symbol that is not present
21+ # in the runner's GLIBC, and the executables won't work.
22+ # TODO: consider producing musl-based executables instead.
23+ FROM rust :bookworm AS builder
1624
1725WORKDIR /usr/src /
1826
Original file line number Diff line number Diff line change 1+ # Note: this must be consistent with the builder image's base image, see the corresponding comment
2+ # in Dockerfile.builder.
13FROM debian:bookworm-slim
24
35RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
You can’t perform that action at this time.
0 commit comments