-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 781 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
# Building Stage
ARG RUST_VERSION=1.85
FROM rust:${RUST_VERSION}-slim-bookworm AS build
WORKDIR /app
COPY LICENSE LICENSE
RUN --mount=type=bind,source=doc,target=doc \
--mount=type=bind,source=src,target=src \
--mount=type=bind,source=crates,target=crates \
--mount=type=bind,source=Cargo.toml,target=Cargo.toml \
--mount=type=bind,source=Cargo.lock,target=Cargo.lock \
<<EOF
set -e
apt-get -y update && apt-get install -y --no-install-recommends pkg-config libssl-dev
cargo build --locked --release
cp target/release/bifrost /bifrost
EOF
# Final Stage
FROM debian:bookworm-slim AS final
COPY --from=build /bifrost /app/bifrost
RUN apt-get -y update && apt-get install -y --no-install-recommends libssl3 ca-certificates
WORKDIR /app
CMD ["/app/bifrost"]