41 lines
1018 B
Docker
41 lines
1018 B
Docker
# Stage 1: Build sova-server
|
|
FROM rustlang/rust:nightly-bookworm AS builder
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
cmake \
|
|
pkg-config \
|
|
libclang-dev \
|
|
libasound2-dev \
|
|
libdbus-1-dev \
|
|
build-essential \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN git clone --depth 1 https://github.com/sova-org/Sova.git /sova
|
|
|
|
WORKDIR /sova
|
|
|
|
# Remove the [patch] section that references a local ../doux/ path
|
|
RUN sed -i '/^\[patch\."https:\/\/github.com\/sova-org\/doux"\]/,/^$/d' Cargo.toml
|
|
|
|
# Force re-resolution without the doux patch
|
|
RUN rm -f Cargo.lock
|
|
|
|
RUN cargo build -p sova-server --release --no-default-features
|
|
|
|
# Verify the binary name
|
|
RUN ls -la target/release/sova*
|
|
|
|
# Stage 2: Minimal runtime image
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
libasound2 \
|
|
libdbus-1-3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /sova/target/release/sova_server /usr/local/bin/sova-server
|
|
|
|
ENTRYPOINT ["sova-server"]
|
|
CMD ["-i", "0.0.0.0", "-p", "8080"]
|