rieter/Dockerfile

40 lines
823 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 \
2024-07-09 17:46:38 +02:00
"https://s3.rustybever.be/rieter/commits/${CI_COMMIT_SHA}/rieterd-$(echo "${TARGETPLATFORM}" | sed 's:/:-:g')" && \
chmod +x rieterd
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"]