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 @@ -34,6 +34,22 @@ dirCommit() {
34
34
)
35
35
}
36
36
37
+ getArches () {
38
+ local repo=" $1 " ; shift
39
+ local officialImagesUrl=' https://github.com/docker-library/official-images/raw/master/library/'
40
+
41
+ eval " declare -A -g parentRepoToArches=( $(
42
+ find -name ' Dockerfile' -exec awk '
43
+ toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|microsoft\/[^:]+)(:|$)/ {
44
+ print "' " $officialImagesUrl " ' " $2
45
+ }
46
+ ' ' {}' + \
47
+ | sort -u \
48
+ | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
49
+ ) )"
50
+ }
51
+ getArches ' gcc'
52
+
37
53
cat << -EOH
38
54
# this file is generated via https://github.com/docker-library/gcc/blob/$( fileCommit " $self " ) /$self
39
55
@@ -51,6 +67,9 @@ join() {
51
67
52
68
for version in " ${versions[@]} " ; do
53
69
commit=" $( dirCommit " $version " ) "
70
+ parent=" $( awk ' toupper($1) == "FROM" { print $2 }' " $version /Dockerfile" ) "
71
+ # no arm32 for now: https://github.com/docker-library/gcc/issues/37
72
+ arches=" $( echo " ${parentRepoToArches[$parent]} " | sed -r ' s/ arm32v[^ ]+ / /g' ) "
54
73
55
74
dockerfile=" $( git show " $commit " :" $version /Dockerfile" ) "
56
75
fullVersion=" $( echo " $dockerfile " | awk ' $1 == "ENV" && $2 == "GCC_VERSION" { print $3; exit }' ) "
@@ -69,6 +88,7 @@ for version in "${versions[@]}"; do
69
88
echo " $dockerfile " | grep -m1 ' ^# Last Modified: '
70
89
cat << -EOE
71
90
Tags: $( join ' , ' " ${versionAliases[@]} " )
91
+ Architectures: $( join ' , ' $arches )
72
92
GitCommit: $commit
73
93
Directory: $version
74
94
EOE
You can’t perform that action at this time.
0 commit comments