Update to use new "DockerFroms" (and "ArchLastStageFrom") function
See https://github.com/docker-library/official-images/pull/5929
This commit is contained in:
parent
635c3577fc
commit
35dab1c8ca
|
|
@ -15,7 +15,7 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
|
||||||
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
|
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
|
||||||
|
|
||||||
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
|
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
|
||||||
{{- $from := $.ArchDockerFrom $arch $e -}}
|
{{- $froms := $.ArchDockerFroms $arch $e -}}
|
||||||
|
|
||||||
{{- $gitRepo := $e.ArchGitRepo $arch -}}
|
{{- $gitRepo := $e.ArchGitRepo $arch -}}
|
||||||
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}
|
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}
|
||||||
|
|
@ -52,7 +52,7 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
|
||||||
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
|
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
|
||||||
|
|
||||||
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
|
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
|
||||||
{{- $from := $.ArchDockerFrom $arch $e -}}
|
{{- $froms := $.ArchDockerFroms $arch $e -}}
|
||||||
|
|
||||||
{{- $gitRepo := $e.ArchGitRepo $arch -}}
|
{{- $gitRepo := $e.ArchGitRepo $arch -}}
|
||||||
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}
|
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ for tag in "$tags"; do
|
||||||
{{- $e := $.TagEntry -}}
|
{{- $e := $.TagEntry -}}
|
||||||
'"$templateArchVar"'
|
'"$templateArchVar"'
|
||||||
{{- if $e.HasArchitecture $arch -}}
|
{{- if $e.HasArchitecture $arch -}}
|
||||||
{{- $from := $.ArchDockerFrom $arch $e -}}
|
{{- $froms := $.ArchDockerFroms $arch $e -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
' "$repo:$tag" &> /dev/null; then
|
' "$repo:$tag" &> /dev/null; then
|
||||||
toFetch+=( "$repo:$tag" )
|
toFetch+=( "$repo:$tag" )
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,14 @@ for tag in "${tags[@]}"; do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$text" ]; then
|
if [ -n "$text" ]; then
|
||||||
default="$([ -f "$repoDir/variant.md" ] && cat "$repoDir/variant.md" || cat "$dir/variant.md")"
|
default="$([ -f "$repoDir/variant.md" ] && cat "$repoDir/variant.md" || cat "$dir/variant.md")"
|
||||||
default+=$'\n' # parameter expansion eats the trailing newline
|
default+=$'\n' # parameter expansion eats the trailing newline
|
||||||
|
|
||||||
# buildpack-deps text
|
# buildpack-deps text
|
||||||
potentialTags="$(bashbrew list --uniq "$bbRepo" | cut -d: -f2)"
|
potentialTags="$(bashbrew list --uniq "$bbRepo" | cut -d: -f2)"
|
||||||
for tag in $potentialTags; do
|
for tag in $potentialTags; do
|
||||||
baseImage="$(bashbrew cat -f '{{ .ArchDockerFrom (.TagEntry.Architectures | first) .TagEntry }}' "$bbRepo:$tag")"
|
baseImage="$(bashbrew cat -f '{{ .ArchLastStageFrom (.TagEntry.Architectures | first) .TagEntry }}' "$bbRepo:$tag" 2>/dev/null)"
|
||||||
case "$baseImage" in
|
case "$baseImage" in
|
||||||
buildpack-deps:*-*) ;; # "scm", "curl" -- not large images
|
buildpack-deps:*-*) ;; # "scm", "curl" -- not large images
|
||||||
buildpack-deps:*)
|
buildpack-deps:*)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue