@@ -32,13 +32,12 @@ import (
32
32
33
33
func testMultiPlatformRun (base * testutil.Base , alpineImage string ) {
34
34
t := base .T
35
- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
35
+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
36
36
testCases := map [string ]string {
37
- "amd64" : "x86_64" ,
38
- "arm64" : "aarch64" ,
39
- "arm" : "armv7l" ,
40
- "linux/arm" : "armv7l" ,
41
- "linux/arm/v7" : "armv7l" ,
37
+ "amd64" : "x86_64" ,
38
+ "arm64" : "aarch64" ,
39
+ "linux/arm64" : "aarch64" ,
40
+ "linux/arm64/v8" : "aarch64" ,
42
41
}
43
42
for plat , expectedUnameM := range testCases {
44
43
t .Logf ("Testing %q (%q)" , plat , expectedUnameM )
@@ -56,7 +55,7 @@ func TestMultiPlatformBuildPush(t *testing.T) {
56
55
testutil .DockerIncompatible (t ) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
57
56
testutil .RequiresBuild (t )
58
57
testutil .RegisterBuildCacheCleanup (t )
59
- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
58
+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
60
59
base := testutil .NewBase (t )
61
60
tID := testutil .Identifier (t )
62
61
reg := testregistry .NewWithNoAuth (base , 0 , false )
@@ -71,9 +70,9 @@ RUN echo dummy
71
70
72
71
buildCtx := helpers .CreateBuildContext (t , dockerfile )
73
72
74
- base .Cmd ("build" , "-t" , imageName , "--platform=amd64,arm64, linux/arm/v7 " , buildCtx ).AssertOK ()
73
+ base .Cmd ("build" , "-t" , imageName , "--platform=amd64,linux/arm64/v8 " , buildCtx ).AssertOK ()
75
74
testMultiPlatformRun (base , imageName )
76
- base .Cmd ("push" , "--platform=amd64,arm64, linux/arm/v7 " , imageName ).AssertOK ()
75
+ base .Cmd ("push" , "--platform=amd64,linux/arm64/v8 " , imageName ).AssertOK ()
77
76
}
78
77
79
78
// TestMultiPlatformBuildPushNoRun tests if the push succeeds in a situation where nerdctl builds
@@ -83,7 +82,7 @@ func TestMultiPlatformBuildPushNoRun(t *testing.T) {
83
82
testutil .DockerIncompatible (t ) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
84
83
testutil .RequiresBuild (t )
85
84
testutil .RegisterBuildCacheCleanup (t )
86
- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
85
+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
87
86
base := testutil .NewBase (t )
88
87
tID := testutil .Identifier (t )
89
88
reg := testregistry .NewWithNoAuth (base , 0 , false )
@@ -98,9 +97,9 @@ CMD echo dummy
98
97
99
98
buildCtx := helpers .CreateBuildContext (t , dockerfile )
100
99
101
- base .Cmd ("build" , "-t" , imageName , "--platform=amd64,arm64, linux/arm/v7 " , buildCtx ).AssertOK ()
100
+ base .Cmd ("build" , "-t" , imageName , "--platform=amd64,linux/arm64/v8 " , buildCtx ).AssertOK ()
102
101
testMultiPlatformRun (base , imageName )
103
- base .Cmd ("push" , "--platform=amd64,arm64, linux/arm/v7 " , imageName ).AssertOK ()
102
+ base .Cmd ("push" , "--platform=amd64,linux/arm64/v8 " , imageName ).AssertOK ()
104
103
}
105
104
106
105
func TestMultiPlatformPullPushAllPlatforms (t * testing.T ) {
@@ -123,7 +122,7 @@ func TestMultiPlatformComposeUpBuild(t *testing.T) {
123
122
testutil .DockerIncompatible (t )
124
123
testutil .RequiresBuild (t )
125
124
testutil .RegisterBuildCacheCleanup (t )
126
- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
125
+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
127
126
base := testutil .NewBase (t )
128
127
129
128
const dockerComposeYAML = `
@@ -135,14 +134,9 @@ services:
135
134
- 8080:80
136
135
svc1:
137
136
build: .
138
- platform: arm64
137
+ platform: linux/ arm64/v8
139
138
ports:
140
139
- 8081:80
141
- svc2:
142
- build: .
143
- platform: linux/arm/v7
144
- ports:
145
- - 8082:80
146
140
`
147
141
dockerfile := fmt .Sprintf (`FROM %s
148
142
RUN uname -m > /usr/share/nginx/html/index.html
@@ -159,7 +153,6 @@ RUN uname -m > /usr/share/nginx/html/index.html
159
153
testCases := map [string ]string {
160
154
"http://127.0.0.1:8080" : "x86_64" ,
161
155
"http://127.0.0.1:8081" : "aarch64" ,
162
- "http://127.0.0.1:8082" : "armv7l" ,
163
156
}
164
157
165
158
for testURL , expectedIndexHTML := range testCases {
0 commit comments