bring back full covers if needed
All checks were successful
Build Multiarch Container Image / call-reusable-workflow (push) Successful in 30m2s

This commit is contained in:
Sebastian Hugentobler 2024-06-26 22:35:03 +02:00
parent b77b1bc139
commit 7deb8e5bfc
Signed by: shu
GPG key ID: BB32CF3CA052C2F0
9 changed files with 142 additions and 84 deletions

View file

@ -1,5 +1,8 @@
FROM docker.io/rust:1-alpine3.20 AS builder
RUN mkdir /tmp/tmp
RUN echo "hesinde:x:2222:2222:Linux User,,,:/:/app" > /passwd
RUN apk --no-cache add \
musl-dev
@ -13,12 +16,16 @@ 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 /passwd /etc/passwd
COPY --from=builder /app /app
CMD ["/app", "--listen-address", "[::]:3000", "--", "/library"]
COPY --from=builder --chown=2222: /tmp/tmp /tmp
ENV TMPDIR=/
VOLUME ["/library"]
USER hesinde
CMD ["/app", "--listen-address", "[::]:3000", "--cache-path", "/tmp/cache", "--", "/library"]
ENV TMPDIR=/tmp
VOLUME ["/library", "/tmp"]
EXPOSE 3000