rieter/Dockerfile

39 lines
797 B
Docker
Raw Normal View History

2024-07-08 22:54:47 +02:00
FROM git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19 AS builder
2023-07-31 22:19:56 +02:00
2024-07-08 22:54:47 +02:00
ARG TARGETPLATFORM
ARG CI_COMMIT_SHA
2023-07-31 22:19:56 +02:00
ARG DI_VER=1.2.5
WORKDIR /app
RUN apk add --no-cache \
curl \
make \
unzip \
2024-07-08 22:54:47 +02:00
pkgconf
2023-07-31 22:19:56 +02:00
# 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 . .
2024-07-08 22:54:47 +02:00
RUN curl \
--fail \
-o rieterd \
"https://s3.rustybever.be/rieter/commits/${CI_COMMIT_SHA}/rieterd-$(echo "${TARGETPLATFORM}" | sed 's:/:-:g')"
2023-07-31 22:19:56 +02:00
2024-07-08 22:54:47 +02:00
FROM alpine:3.19
2023-07-31 22:19:56 +02:00
COPY --from=builder /app/dumb-init /bin/dumb-init
2024-07-08 22:54:47 +02:00
COPY --from=builder /app/rieterd /bin/rieterd
WORKDIR /data
2023-07-31 22:19:56 +02:00
ENTRYPOINT ["/bin/dumb-init", "--"]
CMD ["/bin/rieterd"]