File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,22 @@ dirCommit() {
26
26
)
27
27
}
28
28
29
+ getArches () {
30
+ local repo=" $1 " ; shift
31
+ local officialImagesUrl=' https://github.com/docker-library/official-images/raw/master/library/'
32
+
33
+ eval " declare -g -A parentRepoToArches=( $(
34
+ find -name ' Dockerfile' -exec awk '
35
+ toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|microsoft\/[^:]+)(:|$)/ {
36
+ print "' " $officialImagesUrl " ' " $2
37
+ }
38
+ ' ' {}' + \
39
+ | sort -u \
40
+ | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
41
+ ) )"
42
+ }
43
+ getArches ' memcached'
44
+
29
45
cat << -EOH
30
46
# this file is generated via https://github.com/docker-library/memcached/blob/$( fileCommit " $self " ) /$self
31
47
@@ -63,9 +79,13 @@ for variant in debian alpine; do
63
79
variantAliases=( " ${versionAliases[@]} " )
64
80
fi
65
81
82
+ parent=" $( awk ' toupper($1) == "FROM" { print $2 }' " $variant /Dockerfile" ) "
83
+ arches=" ${parentRepoToArches[$parent]} "
84
+
66
85
echo
67
86
cat << -EOE
68
87
Tags: $( join ' , ' " ${variantAliases[@]} " )
88
+ Architectures: $( join ' , ' $arches )
69
89
GitCommit: $commit
70
90
Directory: $variant
71
91
EOE
You can’t perform that action at this time.
0 commit comments