File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,22 @@ dirCommit() {
37
37
)
38
38
}
39
39
40
+ getArches () {
41
+ local repo=" $1 " ; shift
42
+ local officialImagesUrl=' https://github.com/docker-library/official-images/raw/master/library/'
43
+
44
+ eval " declare -g -A parentRepoToArches=( $(
45
+ find -name ' Dockerfile' -exec awk '
46
+ toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|microsoft\/[^:]+)(:|$)/ {
47
+ print "' " $officialImagesUrl " ' " $2
48
+ }
49
+ ' ' {}' + \
50
+ | sort -u \
51
+ | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
52
+ ) )"
53
+ }
54
+ getArches ' rabbitmq'
55
+
40
56
cat << -EOH
41
57
# this file is generated via https://github.com/docker-library/rabbitmq/blob/$( fileCommit " $self " ) /$self
42
58
@@ -75,9 +91,13 @@ for version in "${versions[@]}"; do
75
91
variantAliases=( " ${variantAliases[@]// latest-/ } " )
76
92
fi
77
93
94
+ variantParent=" $( awk ' toupper($1) == "FROM" { print $2 }' " $version /$variant /Dockerfile" ) "
95
+ variantArches=" ${parentRepoToArches[$variantParent]} "
96
+
78
97
echo
79
98
cat << -EOE
80
99
Tags: $( join ' , ' " ${variantAliases[@]} " )
100
+ Architectures: $( join ' , ' $variantArches )
81
101
GitCommit: $commit
82
102
Directory: $version /$variant
83
103
EOE
@@ -95,6 +115,7 @@ for version in "${versions[@]}"; do
95
115
echo
96
116
cat << -EOE
97
117
Tags: $( join ' , ' " ${subVariantAliases[@]} " )
118
+ Architectures: $( join ' , ' $variantArches )
98
119
GitCommit: $commit
99
120
Directory: $version /$variant /$subVariant
100
121
EOE
You can’t perform that action at this time.
0 commit comments