17 lines
313 B
Docker
17 lines
313 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/filed && upx --best target/release/filed
|
|
|
|
# --- deploy ---
|
|
FROM busybox:musl
|
|
|
|
COPY --from=builder /opt/build/target/release/filed /bin/filed
|
|
CMD [ "/bin/filed" ]
|