run vlmcsd in scratch container

This commit is contained in:
Jonas Leder 2025-05-14 22:23:32 +02:00
commit 22567ab0ec

View file

@ -1,12 +1,14 @@
FROM alpine:3.21 AS builder
WORKDIR /root
RUN apk add --no-cache build-base git make && \
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git && \
cd vlmcsd/ && \
make
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git
WORKDIR /root/vlmcsd
RUN make LDFLAGS=-static
FROM alpine:3.21
FROM jonasled.dev/infra/images/scratch-rootless@sha256:b29ee9170c65f2825d77f1c8d97c6ae138f76fb3a150454eb6eb87e7767fba4b
WORKDIR /root/
COPY --from=builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd
COPY --from=builder /root/vlmcsd/bin/vlmcsd /vlmcsd
EXPOSE 1688/tcp
CMD [ "/usr/bin/vlmcsd", "-D", "-d" ]
USER containeruser
ENTRYPOINT [ "/vlmcsd" ]
CMD ["-D", "-d" ]