Files
rust-imspyder/Dockerfile
2024-01-12 05:01:50 +08:00

20 lines
425 B
Docker

FROM rust:1.75 as builder
WORKDIR /app
RUN USER=root cargo new imspyder
WORKDIR /app/imspyder
RUN mkdir -p .cargo
COPY config.toml .cargo/
COPY Cargo.toml Cargo.lock ./
COPY ./src src
RUN cargo install --path . --color always
# Copy the app to an base Docker image, here we use distroless
FROM rust:alpine
RUN mkdir -p /cache
COPY --from=builder /usr/local/cargo/bin/imspyder /imspyder
USER 1000
ENTRYPOINT ["/imspyder"]