File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1
2+
13FROM --platform=$BUILDPLATFORM rust:1.95-slim AS builder
24
35WORKDIR /usr/src/sqlpage
@@ -12,10 +14,16 @@ RUN cargo init .
1214RUN /usr/local/bin/setup-cross-compilation.sh "$TARGETARCH" "$BUILDARCH"
1315
1416COPY Cargo.toml Cargo.lock ./
15- RUN /usr/local/bin/build-dependencies.sh
17+ RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
18+ --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \
19+ --mount=type=cache,target=/usr/src/sqlpage/target \
20+ /usr/local/bin/build-dependencies.sh
1621
1722COPY . .
18- RUN /usr/local/bin/build-project.sh
23+ RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
24+ --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \
25+ --mount=type=cache,target=/usr/src/sqlpage/target \
26+ /usr/local/bin/build-project.sh
1927
2028# Default minimal image (busybox-based)
2129FROM busybox:glibc AS minimal
You can’t perform that action at this time.
0 commit comments