little-hesinde/Containerfile

24 lines
475 B
Plaintext
Raw Normal View History

2024-06-26 06:06:48 +00:00
FROM docker.io/rust:1-alpine3.20 AS builder
2024-05-10 15:09:07 +00:00
RUN apk --no-cache add \
musl-dev
2024-05-10 15:09:07 +00:00
ENV CARGO_CARGO_NEW_VCS="none"
ENV CARGO_BUILD_RUSTFLAGS="-C target-feature=+crt-static"
WORKDIR /work
COPY . .
RUN cargo build --release --target=$(arch)-unknown-linux-musl
2024-05-10 15:31:27 +00:00
RUN cp "./target/$(arch)-unknown-linux-musl/release/little-hesinde" /app
2024-05-10 15:09:07 +00:00
FROM scratch
COPY --from=builder /app /app
2024-06-26 06:06:48 +00:00
CMD ["/app", "--listen-address", "[::]:3000", "--", "/library"]
2024-05-10 15:09:07 +00:00
VOLUME ["/library"]
EXPOSE 3000