FROM alpine:latest AS builder RUN apk add --no-cache curl \ && while [ "$QEMU_DOWNLOAD_URL" == "" ] ; do QEMU_DOWNLOAD_URL=$(curl -s https://api.github.com/repos/multiarch/qemu-user-static/releases/latest | grep "browser_download_url" | grep "\/qemu-arm-static.tar.gz" | cut -d\" -f4) ; done \ && curl --retry 3 -L -s -o /tmp/qemu-arm-static.tar.gz $QEMU_DOWNLOAD_URL \ && tar xzf /tmp/qemu-arm-static.tar.gz \ && while [ "$DOWNLOAD_URL" == "" ] ; do DOWNLOAD_URL=$(curl -s https://api.github.com/repos/restic/restic/releases/latest | grep "browser_download_url" | grep "linux_arm\." | cut -d\" -f4) ; done \ && curl --retry 3 -L -s -o restic.bz2 ${DOWNLOAD_URL} \ && bunzip2 restic.bz2 \ && chmod +x restic FROM arm32v6/alpine:latest COPY --from=builder qemu-arm-static restic /usr/bin/ RUN apk add --no-cache bash curl jq openssh-client dcron tzdata COPY restic-auto docker-entrypoint.sh docker-command.sh /usr/local/bin/ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] CMD ["/usr/local/bin/docker-command.sh"]