Initial commit: standalone Sova jam server setup
This commit is contained in:
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user