forked from ANSSI-FR/lidi
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (13 loc) · 673 Bytes
/
Dockerfile
File metadata and controls
19 lines (13 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# NOTE: use Google's "distroless with libgcc1" base image, see:
# https://github.com/GoogleContainerTools/distroless/blob/6755e21ccd99ddead6edc8106ba03888cbeed41a/cc/README.md
ARG BASE_IMAGE_FINAL_STAGES="gcr.io/distroless/cc:nonroot"
FROM rust:1-bookworm AS builder
WORKDIR /usr/src/lidi
COPY . .
RUN cargo install --path .
FROM ${BASE_IMAGE_FINAL_STAGES} AS send
COPY --from=builder --chown=root:root --chmod=755 /usr/local/cargo/bin/diode-send /usr/local/bin/
ENTRYPOINT ["diode-send"]
FROM ${BASE_IMAGE_FINAL_STAGES} AS receive
COPY --from=builder --chown=root:root --chmod=755 /usr/local/cargo/bin/diode-receive /usr/local/bin/
ENTRYPOINT ["diode-receive"]