28 lines
720 B
Docker
28 lines
720 B
Docker
# Keep builder and runtime on bookworm so the binary does not require a newer glibc.
|
|
FROM rust:1-bookworm AS builder
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends pkg-config libssl-dev ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY Cargo.toml Cargo.lock* ./
|
|
COPY build.rs ./build.rs
|
|
COPY src ./src
|
|
COPY templates ./templates
|
|
|
|
RUN cargo build --release
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /data
|
|
COPY --from=builder /app/target/release/amnezia-fellow /usr/local/bin/amnezia-fellow
|
|
|
|
EXPOSE 8000
|
|
CMD ["amnezia-fellow", "--listen", "0.0.0.0:8000"]
|