-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (18 loc) · 695 Bytes
/
Dockerfile
File metadata and controls
20 lines (18 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ARG RUST_VERSION=1.90.0
FROM rust:${RUST_VERSION}-slim-trixie AS builder
WORKDIR /app
RUN --mount=type=bind,source=src,target=src \
--mount=type=bind,source=assets,target=assets \
--mount=type=bind,source=build.rs,target=build.rs \
--mount=type=bind,source=Cargo.toml,target=Cargo.toml \
--mount=type=bind,source=Cargo.lock,target=Cargo.lock \
--mount=type=cache,target=/app/target/ \
--mount=type=cache,target=/usr/local/cargo/registry/ \
<<EOF
set -e
cargo build --locked --release
cp ./target/release/asciinema /usr/local/bin/
EOF
FROM debian:trixie-slim AS run
COPY --from=builder /usr/local/bin/asciinema /usr/local/bin
ENTRYPOINT ["/usr/local/bin/asciinema"]