cannibal/Dockerfile
2026-04-03 20:51:34 +02:00

24 lines
762 B
Docker

ARG ALPINE_VERSION=3.21
FROM alpine:${ALPINE_VERSION}
ARG SUPERCRONIC_VERSION=0.2.33
# TARGETARCH is auto-set by buildx per platform: "amd64", "arm64", etc.
ARG TARGETARCH
RUN apk add --no-cache docker-cli
ADD https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-${TARGETARCH} \
/usr/local/bin/supercronic
RUN chmod +x /usr/local/bin/supercronic
# Match GID to your host's docker group. Check with: stat -c '%g' /var/run/docker.sock
ARG DOCKER_GID=999
RUN getent group ${DOCKER_GID} || addgroup -g ${DOCKER_GID} dockersock && \
adduser -D -G $(getent group ${DOCKER_GID} | cut -d: -f1) cannibal
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER cannibal
ENTRYPOINT ["/entrypoint.sh"]