Files
rust-imspyder/Dockerfile
2024-01-12 04:54:22 +08:00

20 lines
427 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 alpine:latest
RUN mkdir -p /cache
COPY --from=builder /usr/local/cargo/bin/imspyder /imspyder
USER 1000
ENTRYPOINT ["/imspyder"]