mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
20 lines
483 B
Docker
20 lines
483 B
Docker
# Build Stage
|
|
FROM rustlang/rust:nightly-slim AS builder
|
|
USER 0:0
|
|
WORKDIR /home/rust/src
|
|
|
|
RUN USER=root cargo new --bin bonfire
|
|
WORKDIR /home/rust/src/bonfire
|
|
RUN apt-get update && apt-get install -y libssl-dev pkg-config
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
RUN cargo install --locked --path .
|
|
|
|
# Bundle Stage
|
|
FROM debian:buster-slim
|
|
RUN apt-get update && apt-get install -y ca-certificates
|
|
COPY --from=builder /usr/local/cargo/bin/bonfire ./
|
|
EXPOSE 9000
|
|
CMD ["./bonfire"]
|