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
21 lines (14 loc) · 740 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (14 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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.97-bookworm AS builder
COPY --from=ghcr.io/casey/just:1.58.0 /just /usr/local/bin/
WORKDIR /usr/src/lidi
COPY . .
RUN just release
FROM ${BASE_IMAGE_FINAL_STAGES} AS send
COPY --from=builder --chown=root:root --chmod=755 /usr/src/lidi/target/release/lidi-send /usr/local/bin/
ENTRYPOINT ["lidi-send"]
FROM ${BASE_IMAGE_FINAL_STAGES} AS receive
COPY --from=builder --chown=root:root --chmod=755 /usr/src/lidi/target/release/lidi-receive /usr/local/bin/
ENTRYPOINT ["lidi-receive"]