-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 875 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM rust:1.95.0-bookworm AS build-env
LABEL maintainer="yanorei32"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /usr/src
COPY . /usr/src/webhook-sender/
WORKDIR /usr/src/webhook-sender
RUN cargo build --release && cargo install cargo-license && cargo license \
--authors \
--do-not-bundle \
--avoid-dev-deps \
--avoid-build-deps \
--filter-platform "$(rustc -vV | sed -n 's|host: ||p')" \
> CREDITS
FROM debian:bookworm-slim
RUN apt-get update; \
apt-get install -y --no-install-recommends \
libssl3 ca-certificates; \
apt-get clean;
WORKDIR /
COPY --chown=root:root --from=build-env \
/usr/src/webhook-sender/CREDITS \
/usr/src/webhook-sender/LICENSE \
/usr/share/licenses/webhook-sender/
COPY --chown=root:root --from=build-env \
/usr/src/webhook-sender/target/release/webhook-sender \
/usr/bin/webhook-sender
CMD ["/usr/bin/webhook-sender"]