update code
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,10 +1,9 @@
|
|||||||
FROM rust:1.75 as builder
|
FROM rust:1.75 as builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ARG APP=imspyder
|
|
||||||
|
|
||||||
RUN USER=root cargo new $APP
|
RUN USER=root cargo new imspyder
|
||||||
WORKDIR /app/$APP
|
WORKDIR /app/imspyder
|
||||||
RUN mkdir -p .cargo
|
RUN mkdir -p .cargo
|
||||||
COPY config.toml .cargo/
|
COPY config.toml .cargo/
|
||||||
COPY Cargo.toml Cargo.lock ./
|
COPY Cargo.toml Cargo.lock ./
|
||||||
@@ -15,9 +14,7 @@ RUN cargo install --path . --color always
|
|||||||
# Copy the app to an base Docker image, here we use distroless
|
# Copy the app to an base Docker image, here we use distroless
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG APP=imspyder
|
|
||||||
|
|
||||||
RUN mkdir -p /cache
|
RUN mkdir -p /cache
|
||||||
COPY --from=builder /usr/local/cargo/bin/$APP /$APP
|
COPY --from=builder /usr/local/cargo/bin/imspyder /imspyder
|
||||||
USER 1000
|
USER 1000
|
||||||
ENTRYPOINT ["/$APP"]
|
ENTRYPOINT ["/imspyder"]
|
||||||
Reference in New Issue
Block a user