Skip to content

Commit 94290d6

Browse files
2 parents 1e1c77f + 55bb3ce commit 94290d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ RUN update-ca-certificates
55
WORKDIR /its_mypic_image_server
66

77
COPY . .
8-
9-
RUN cargo build --release
10-
8+
RUN --mount=type=cache,target=/usr/local/cargo/git/db \
9+
--mount=type=cache,target=/usr/local/cargo/registry/ \
10+
--mount=type=cache,target=/its_mypic_image_server/target/ \
11+
cargo build --release; mv target/release/its_mypic_image_server /its_mypic_image_server/its_mypic_image_server
1112

1213
FROM gcr.io/distroless/cc
1314

1415
WORKDIR /its_mypic_image_server
1516

1617
COPY --from=mwader/static-ffmpeg:7.1 /ffmpeg /usr/local/bin/
1718

18-
COPY --from=builder /its_mypic_image_server/target/release/its_mypic_image_server .
19+
COPY --from=builder /its_mypic_image_server/its_mypic_image_server .
1920

2021
CMD ["/its_mypic_image_server/its_mypic_image_server"]

0 commit comments

Comments
 (0)