Files
storage/Dockerfile
lychang e4b5123ae1
All checks were successful
Nginx / build (push) Successful in 1m21s
update Config.toml
2025-06-24 02:57:00 +08:00

26 lines
664 B
Docker

FROM rust:1.87 as builder
WORKDIR /app
RUN USER=root cargo new storage
WORKDIR /app/storage
RUN mkdir -p .cargo
COPY config.toml .cargo/
COPY Cargo.toml ./
COPY ./src src
RUN cargo install --path . --color always
# Copy the app to an base Docker image, here we use distroless
FROM ubuntu:latest
ENV MINIO_REGION ""
ENV MINIO_ENDPOINT http://192.168.1.100:9000
ENV MINIO_ACCESS_KEY 8hp6291qwQdfL1PKVHea
ENV MINIO_SECRET_KEY 4fRjSnkoph2azfHnJVCETjAej6UXpCfd4JKnlNe3
RUN apt-get update
RUN apt-get install -y ca-certificates
RUN update-ca-certificates
RUN mkdir -p /cache
COPY --from=builder /usr/local/cargo/bin/storage /storage
USER 1000
ENTRYPOINT ["/storage"]