poke/january/Dockerfile

21 lines
542 B
Docker
Raw Permalink Normal View History

2023-12-10 11:23:48 +01:00
# Build Stage
2024-04-22 23:37:54 +02:00
FROM rustlang/rust:nightly-bullseye-slim AS builder
2023-12-10 11:23:48 +01:00
USER 0:0
WORKDIR /home/rust/src
2024-04-22 23:37:54 +02:00
RUN apt-get update && apt-get install -y libssl-dev pkg-config
2023-12-10 11:23:48 +01:00
RUN USER=root cargo new --bin january
WORKDIR /home/rust/src/january
COPY Cargo.toml Cargo.lock ./
COPY src ./src
2024-04-22 23:37:54 +02:00
RUN cargo install --locked --path .
2023-12-10 11:23:48 +01:00
# Bundle Stage
2024-04-22 23:37:54 +02:00
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y ca-certificates ffmpeg libssl-dev
2023-12-10 11:23:48 +01:00
COPY --from=builder /usr/local/cargo/bin/january ./
EXPOSE 7000
ENV JANUARY_HOST 0.0.0.0:7000
CMD ["./january"]