FROM git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19 AS builder ARG TARGETPLATFORM ARG CI_COMMIT_SHA ARG DI_VER=1.2.5 WORKDIR /app RUN apk add --no-cache \ curl \ make \ unzip \ pkgconf # Build dumb-init RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.tar.gz" | tar -xzf - && \ cd "dumb-init-${DI_VER}" && \ make SHELL=/bin/sh && \ mv dumb-init .. && \ cd .. COPY . . RUN curl \ --fail \ -o rieterd \ "https://s3.rustybever.be/rieter/commits/${CI_COMMIT_SHA}/rieterd-$(echo "${TARGETPLATFORM}" | sed 's:/:-:g')" && \ chmod +x rieterd FROM alpine:3.19 COPY --from=builder /app/dumb-init /bin/dumb-init COPY --from=builder /app/rieterd /bin/rieterd WORKDIR /data ENTRYPOINT ["/bin/dumb-init", "--"] CMD ["/bin/rieterd"]