little-hesinde/Containerfile
Sebastian Hugentobler 672c50e5c5
All checks were successful
Build Multiarch Container Image / call-reusable-workflow (push) Successful in 20m20s
make listening address configurable
2024-06-26 08:06:48 +02:00

24 lines
475 B
Docker

FROM docker.io/rust:1-alpine3.20 AS builder
RUN apk --no-cache add \
musl-dev
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
RUN cp "./target/$(arch)-unknown-linux-musl/release/little-hesinde" /app
FROM scratch
COPY --from=builder /app /app
CMD ["/app", "--listen-address", "[::]:3000", "--", "/library"]
VOLUME ["/library"]
EXPOSE 3000