File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ FROM rust:latest
22
33WORKDIR /usr/src/app
44COPY . .
5- RUN cargo build --release --target x86_64-unknown-linux-gnu
5+ RUN cargo build --release
66
7- FROM debian:10 -slim
7+ FROM debian:13 -slim
88
99RUN apt-get update && apt-get install -y \
1010 ca-certificates \
1111 && rm -rf /var/lib/apt/lists/*
1212
1313WORKDIR /root/
14- COPY --from=0 /usr/src/app/target/x86_64-unknown-linux-gnu/ release/dino-park-fossil .
15- CMD ["./dino-park-fossil" ]
14+ COPY --from=0 /usr/src/app/target/release/dino-park-fossil .
15+ CMD ["./dino-park-fossil" ]
Original file line number Diff line number Diff line change 1- FROM debian:10-slim
1+ # This is mostly the same as the regular Dockerfile build, except we cache
2+ # locally.
3+ FROM rust:latest
4+
5+ WORKDIR /usr/src/app
6+ COPY . .
7+ RUN --mount=type=cache,target=/usr/src/app/target/release/build \
8+ --mount=type=cache,target=/usr/src/app/target/release/deps \
9+ --mount=type=cache,target=/usr/src/app/target/release/incremental \
10+ --mount=type=cache,target=/usr/local/cargo/registry \
11+ cargo build --release
12+
13+ FROM debian:13-slim
214
315RUN apt-get update && apt-get install -y \
416 ca-certificates \
517 && rm -rf /var/lib/apt/lists/*
618
719WORKDIR /root/
8- COPY target/release/dino-park-fossil .
20+ COPY --from=0 /usr/src/app/ target/release/dino-park-fossil .
921CMD ["./dino-park-fossil"]
You can’t perform that action at this time.
0 commit comments