This commit is contained in:
nora 2023-08-31 21:03:37 +02:00
parent 3e2b62705e
commit 846b7f3a24

View file

@ -1,7 +1,5 @@
FROM docker.io/library/rust:1.72 as build
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update
RUN apt-get install musl-tools -y
@ -10,16 +8,16 @@ COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
RUN mkdir src
RUN echo "fn main() {}" > src/main.rs
RUN cargo build --release --target x86_64-unknown-linux-musl
RUN cargo build --release
COPY . .
# now rebuild with the proper main
RUN touch src/main.rs
RUN cargo build --release --target x86_64-unknown-linux-musl
RUN cargo build --release
### RUN
FROM gcr.io/distroless/static-debian12
FROM gcr.io/distroless/cc
WORKDIR /app