20 lines
577 B
Text
20 lines
577 B
Text
FROM rust:slim-bookworm AS builder
|
|
|
|
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY Cargo.toml Cargo.lock rustfmt.toml ./
|
|
COPY crates/ ./crates/
|
|
|
|
RUN cargo build --release --bin rampart-core && \
|
|
cp target/release/rampart-core /app/rampart-core && \
|
|
strip /app/rampart-core
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /app/rampart-core /usr/local/bin/rampart-core
|
|
|
|
EXPOSE 25565 9090
|
|
|
|
ENTRYPOINT ["rampart-core"]
|