@@ -32,13 +32,12 @@ import (
3232
3333func testMultiPlatformRun (base * testutil.Base , alpineImage string ) {
3434 t := base .T
35- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
35+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
3636 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" ,
4241 }
4342 for plat , expectedUnameM := range testCases {
4443 t .Logf ("Testing %q (%q)" , plat , expectedUnameM )
@@ -56,7 +55,7 @@ func TestMultiPlatformBuildPush(t *testing.T) {
5655 testutil .DockerIncompatible (t ) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
5756 testutil .RequiresBuild (t )
5857 testutil .RegisterBuildCacheCleanup (t )
59- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
58+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
6059 base := testutil .NewBase (t )
6160 tID := testutil .Identifier (t )
6261 reg := testregistry .NewWithNoAuth (base , 0 , false )
@@ -71,9 +70,9 @@ RUN echo dummy
7170
7271 buildCtx := helpers .CreateBuildContext (t , dockerfile )
7372
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 ()
7574 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 ()
7776}
7877
7978// TestMultiPlatformBuildPushNoRun tests if the push succeeds in a situation where nerdctl builds
@@ -83,7 +82,7 @@ func TestMultiPlatformBuildPushNoRun(t *testing.T) {
8382 testutil .DockerIncompatible (t ) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
8483 testutil .RequiresBuild (t )
8584 testutil .RegisterBuildCacheCleanup (t )
86- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
85+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
8786 base := testutil .NewBase (t )
8887 tID := testutil .Identifier (t )
8988 reg := testregistry .NewWithNoAuth (base , 0 , false )
@@ -98,9 +97,9 @@ CMD echo dummy
9897
9998 buildCtx := helpers .CreateBuildContext (t , dockerfile )
10099
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 ()
102101 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 ()
104103}
105104
106105func TestMultiPlatformPullPushAllPlatforms (t * testing.T ) {
@@ -123,7 +122,7 @@ func TestMultiPlatformComposeUpBuild(t *testing.T) {
123122 testutil .DockerIncompatible (t )
124123 testutil .RequiresBuild (t )
125124 testutil .RegisterBuildCacheCleanup (t )
126- testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" , "linux/arm/v7" )
125+ testutil .RequireExecPlatform (t , "linux/amd64" , "linux/arm64" )
127126 base := testutil .NewBase (t )
128127
129128 const dockerComposeYAML = `
@@ -135,14 +134,9 @@ services:
135134 - 8080:80
136135 svc1:
137136 build: .
138- platform: arm64
137+ platform: linux/ arm64/v8
139138 ports:
140139 - 8081:80
141- svc2:
142- build: .
143- platform: linux/arm/v7
144- ports:
145- - 8082:80
146140`
147141 dockerfile := fmt .Sprintf (`FROM %s
148142RUN uname -m > /usr/share/nginx/html/index.html
@@ -159,7 +153,6 @@ RUN uname -m > /usr/share/nginx/html/index.html
159153 testCases := map [string ]string {
160154 "http://127.0.0.1:8080" : "x86_64" ,
161155 "http://127.0.0.1:8081" : "aarch64" ,
162- "http://127.0.0.1:8082" : "armv7l" ,
163156 }
164157
165158 for testURL , expectedIndexHTML := range testCases {
0 commit comments