File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ func platformVector(platform specs.Platform) []specs.Platform {
3737 vector := []specs.Platform {platform }
3838
3939 switch platform .Architecture {
40+ case "amd64" :
41+ vector = append (vector , specs.Platform {
42+ Architecture : "386" ,
43+ OS : platform .OS ,
44+ OSVersion : platform .OSVersion ,
45+ OSFeatures : platform .OSFeatures ,
46+ Variant : platform .Variant ,
47+ })
4048 case "arm" :
4149 if armVersion , err := strconv .Atoi (strings .TrimPrefix (platform .Variant , "v" )); err == nil && armVersion > 5 {
4250 for armVersion -- ; armVersion >= 5 ; armVersion -- {
@@ -60,6 +68,7 @@ func platformVector(platform specs.Platform) []specs.Platform {
6068// For arm/v8, will also match arm/v7, arm/v6 and arm/v5
6169// For arm/v7, will also match arm/v6 and arm/v5
6270// For arm/v6, will also match arm/v5
71+ // For amd64, will also match 386
6372func Only (platform specs.Platform ) MatchComparer {
6473 return Ordered (platformVector (Normalize (platform ))... )
6574}
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ func TestOnly(t *testing.T) {
3030 matches : map [bool ][]string {
3131 true : {
3232 "linux/amd64" ,
33+ "linux/386" ,
3334 },
3435 false : {
35- "linux/386" ,
3636 "linux/arm/v7" ,
3737 "linux/arm64" ,
3838 "windows/amd64" ,
You can’t perform that action at this time.
0 commit comments