-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (20 loc) · 651 Bytes
/
Dockerfile
File metadata and controls
24 lines (20 loc) · 651 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
# syntax=docker/dockerfile:1
FROM rust:1-trixie AS chef
RUN cargo install cargo-chef --locked
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --tests && \
cargo chef cook --release
COPY . .
RUN cargo test && \
cargo build --release
FROM debian:trixie-slim AS runtime
RUN groupadd -g 1001 lichess && \
useradd -u 1001 -g lichess -m -d /home/lichess -s /bin/bash lichess
COPY --from=builder --chown=lichess:lichess /app/target/release/lila-engine /usr/local/bin/lila-engine
USER lichess
ENTRYPOINT ["/usr/local/bin/lila-engine"]