bfile/filed/Dockerfile.prod

22 lines
442 B
Docker

# --- build ---
FROM rust:alpine as builder
WORKDIR /opt/build
COPY filed .
COPY ./.git ./.git
RUN apk add --no-cache git musl-dev upx nodejs yarn && \
yarn global add uglify-js@3.17.4 html-minifier
RUN cargo b -r
RUN strip target/release/filed && upx --best target/release/filed
# --- deploy ---
FROM alpine:3.17
RUN mkdir /config
WORKDIR /config
COPY --from=builder /opt/build/target/release/filed /bin/filed
CMD [ "/bin/filed" ]