5c46679dd6
the default addr was switched to 0.0.0.0 in the main branch now anyways
21 lines
465 B
Docker
21 lines
465 B
Docker
FROM lukemathwalker/cargo-chef:latest-rust-alpine as chef
|
|
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/
|
|
EXPOSE 28019
|
|
ENTRYPOINT ["/usr/local/bin/app"]
|