From c8c73ce24c531eb682f0a3e93c44d644526db40b Mon Sep 17 00:00:00 2001 From: will Farrell Date: Wed, 2 Dec 2020 14:00:21 -0700 Subject: [PATCH] docs: add in latest, built daily --- README.md | 1 + buildx.sh | 54 ------------------------------------------------------ 2 files changed, 1 insertion(+), 54 deletions(-) delete mode 100755 buildx.sh diff --git a/README.md b/README.md index 2b1aaf0..4c1a557 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ This functionality was proposed to be included with the addition of `HEALTHCHECK This container is a stand-in till there is native support for `--exit-on-unhealthy` https://github.com/docker/docker/pull/22719. ## Supported tags and Dockerfile links +- [`latest` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/main/Dockerfile) - [`1.0.0` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/1.0.0/Dockerfile) - [`v0.7.0` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/v0.7.0/Dockerfile) diff --git a/buildx.sh b/buildx.sh deleted file mode 100755 index e5fb06b..0000000 --- a/buildx.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -IMAGE_NAME="willfarrell/autoheal" - -usage() { - echo "Usage: $0" -} - -array_join() { - local IFS="$1" - shift - echo "$*" -} - -get_available_architectures() { - local image="$1" - local tag="${2:-latest}" - - docker buildx imagetools inspect --raw "${image}:${tag}" | \ - jq -r '.manifests[].platform | .os + "/" + .architecture + "/" + .variant' | \ - sed 's#/$##' | sort -} - -if [[ "${BASH_SOURCE[0]}" == "${0}" ]] -then - set -ex - - cd "$(readlink -f "$(dirname "$0")")" || exit 9 - - read -r base_image base_tag <<< \ - "$(sed -nr 's/^FROM\s+([^:]+):?((\w+).*)\s*$/\1 \3/p' Dockerfile | head -1)" - # shellcheck disable=2207 - platforms=($(get_available_architectures "$base_image" "$base_tag")) - - PUSH_IMAGE=true - BUILD_TYPE=manual - - if [[ "$TRAVIS" == "true" ]] - then - BUILD_TYPE=travis - elif [[ "$GITHUB_ACTIONS" == "true" ]] - then - BUILD_TYPE=github - fi - - docker buildx build \ - --platform "$(array_join "," "${platforms[@]}")" \ - --output "type=image,push=${PUSH_IMAGE}" \ - --no-cache \ - --label=build-type="$BUILD_TYPE" \ - --label=built-on="$HOSTNAME" \ - --tag "${IMAGE_NAME}:latest" \ - . -fi