forked from mozilla-iam/dino-park-fence
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.local
More file actions
21 lines (18 loc) · 748 Bytes
/
Copy pathDockerfile.local
File metadata and controls
21 lines (18 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This is mostly the same as the regular Dockerfile build, except we cache
# locally.
FROM rust:latest
WORKDIR /usr/src/app
COPY . .
RUN --mount=type=cache,target=/usr/src/app/target/release/build \
--mount=type=cache,target=/usr/src/app/target/release/deps \
--mount=type=cache,target=/usr/src/app/target/release/incremental \
--mount=type=cache,target=/usr/local/cargo/registry \
ls -lah target/release/build && ls -lah target/release/deps && ls -lah target/release/incremental && \
cargo build --release
FROM debian:13-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root/
COPY --from=0 /usr/src/app/target/release/dino-park-fence .
CMD ["./dino-park-fence"]