cannibal/Dockerfile

24 lines
756 B
Docker

ARG ALPINE_VERSION=3.21
FROM alpine:${ALPINE_VERSION}
# Re-declare after FROM — build ARGs don't persist across FROM
ARG SUPERCRONIC_VERSION=0.2.33
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 755 /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"]