From 0e0d2d79392cbaa1b0ca7e8d4dc2a558ec3944fb Mon Sep 17 00:00:00 2001 From: TMKnight <548588+tmknight@users.noreply.github.com> Date: Mon, 15 Jan 2024 08:23:02 -0500 Subject: [PATCH] Update docker-autoheal.dockerfile --- docker/docker-autoheal.dockerfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/docker-autoheal.dockerfile b/docker/docker-autoheal.dockerfile index 7ac8f60..6ad5bcf 100644 --- a/docker/docker-autoheal.dockerfile +++ b/docker/docker-autoheal.dockerfile @@ -1,8 +1,17 @@ -FROM cgr.dev/chainguard/wolfi-base:latest +FROM alpine:latest as build -ARG BIN_VER +WORKDIR / -COPY ./bin/docker-autoheal-musl_${BIN_VER} /docker-autoheal +ARG TARGETARCH + +RUN [ "${TARGETARCH}" == "amd64" ] && ARCH=x86_64 || ARCH=aarch64 \ + && curl -sLO https://github.com/tmknight/docker-autoheal/releases/latest/download/docker-autoheal-${ARCH}-unknown-linux-musl.tar.gz \ + && tar -xvf docker-autoheal-${ARCH}-unknown-linux-musl.tar.gz \ + && chmod +x docker-autoheal + +FROM alpine:latest + +COPY --from=builder /docker-autoheal /docker-autoheal HEALTHCHECK --interval=5s \ CMD pgrep -f docker-autoheal || exit 1