mirror of
https://github.com/joomla-docker/docker-joomla.git
synced 2024-11-18 02:55:13 +00:00
commit
49eb2465af
@ -33,6 +33,22 @@ dirCommit() {
|
||||
)
|
||||
}
|
||||
|
||||
getArches() {
|
||||
local repo="$1"; shift
|
||||
local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
|
||||
|
||||
eval "declare -g -A parentRepoToArches=( $(
|
||||
find -name 'Dockerfile' -exec awk '
|
||||
toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
|
||||
print "'"$officialImagesUrl"'" $2
|
||||
}
|
||||
' '{}' + \
|
||||
| sort -u \
|
||||
| xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
|
||||
) )"
|
||||
}
|
||||
getArches 'joomla'
|
||||
|
||||
cat <<-EOH
|
||||
# this file is generated via https://github.com/joomla/docker-joomla/blob/$(fileCommit "$self")/$self
|
||||
|
||||
@ -97,10 +113,12 @@ for phpVersion in "${phpVersions[@]}"; do
|
||||
fi
|
||||
|
||||
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
|
||||
variantArches="${parentRepoToArches[$variantParent]}"
|
||||
|
||||
echo
|
||||
cat <<-EOE
|
||||
Tags: $(join ', ' "${fullAliases[@]}")
|
||||
Architectures: $(join ', ' $variantArches)
|
||||
GitCommit: $commit
|
||||
Directory: $dir
|
||||
EOE
|
||||
|
Loading…
Reference in New Issue
Block a user