20 lines
358 B
Docker
20 lines
358 B
Docker
# --- 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
|
|
|
|
# --- deploy ---
|
|
FROM alpipne:3.17
|
|
|
|
RUN mkdir /config
|
|
WORKDIR /config
|
|
|
|
COPY --from=builder /opt/build/target/release/janitor /bin/janitor
|
|
CMD [ "/bin/janitor" ]
|