metasearch/Containerfile

22 lines
498 B
Plaintext
Raw Normal View History

FROM lukemathwalker/cargo-chef:latest-rust-slim as chef
2024-01-22 05:31:08 +00:00
WORKDIR /app
FROM chef AS planner
COPY ./Cargo.toml ./Cargo.lock ./
COPY ./src ./src
RUN cargo chef prepare
FROM chef AS builder
COPY --from=planner /app/recipe.json .
RUN cargo chef cook --release
COPY . .
RUN cargo build --release
RUN mv ./target/release/metasearch2 ./app
FROM scratch AS runtime
WORKDIR /app
COPY --from=builder /app/app /usr/local/bin/
COPY ./config.toml /usr/local/bin/
2024-01-22 05:31:08 +00:00
EXPOSE 28019
ENTRYPOINT ["/usr/local/bin/app"]