little-hesinde/Containerfile
Sebastian Hugentobler b8ed5b1cdf
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled
search database has to be a file, as in-memory dbs are per connection
2024-06-26 16:14:58 +02:00

25 lines
488 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"]
ENV TMPDIR=/
VOLUME ["/library"]
EXPOSE 3000