-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 734 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 734 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
# Use a specific base image
FROM rust:slim-bullseye AS builder
# Setup the working directory
WORKDIR /root/timecat
# Copy only the necessary files
COPY src ./src
COPY Cargo.toml .
COPY build.rs .
COPY README.md .
COPY documentation ./documentation
# Set environment variables to optimize build
ENV RUSTFLAGS="-C target-cpu=native"
# Build the application
RUN cargo build --release --bin timecat --no-default-features --features inbuilt_nnue
# Use a minimal base image for the final stage
FROM debian:bullseye-slim
# Copy the built executable from the builder stage
COPY --from=builder /root/timecat/target/release/timecat /usr/local/bin/timecat
# Set up runtime command
CMD ["timecat"]
# CMD ["timecat", "--no-color", "--uci"]