bfile/janitor/Dockerfile.prod

20 lines
357 B
Docker
Raw Permalink Normal View History

2023-10-12 12:39:28 +02:00
# --- build ---
FROM rust:alpine as builder
WORKDIR /opt/build
COPY . .
RUN apk add --no-cache musl-dev upx
RUN cargo b -r
RUN strip target/release/janitor && upx --best target/release/janitor
2023-10-12 12:39:28 +02:00
# --- deploy ---
2023-10-31 18:11:19 +01:00
FROM alpine:3.17
2023-10-12 12:39:28 +02:00
2023-10-22 16:03:02 +02:00
RUN mkdir /config
WORKDIR /config
COPY --from=builder /opt/build/target/release/janitor /bin/janitor
CMD [ "/bin/janitor" ]