File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,18 @@ const buildDockerImage = async (
3636 childProcess . execSync (
3737 `unzip ${ runtime . path } _${ architecture } .zip -d ${ runtime . path } `
3838 ) ;
39- console . log ( "runtime = " ) ;
40- console . log ( runtime ) ;
41- console . log ( "runtime image" ) ;
42- console . log ( runtime . image ) ;
43- console . log ( "runtime image base" ) ;
44- console . log ( runtime . image . baseImage ) ;
4539 const platform = architecture === "x86_64" ? "linux/amd64" : "linux/arm64" ;
4640 const tag = `${ accountId } .dkr.ecr.${ region } .amazonaws.com/lambda-perf:${ runtime . path } -${ architecture } ` ;
47- const cmdLine = `docker build . -f Dockerfile.sample --platform ${ platform } -t ${ tag } --build-arg baseImage='${ runtime . image . baseImage } ' --build-arg handlerCode='${ runtime . path } ' --build-arg handlerCmd='${ runtime . handler } '` ;
41+ const cmdLine = `
42+ docker buildx build . \
43+ -f Dockerfile.sample \
44+ --platform ${ platform } \
45+ --load \
46+ -t ${ tag } \
47+ --build-arg baseImage='${ runtime . image . baseImage } ' \
48+ --build-arg handlerCode='${ runtime . path } ' \
49+ --build-arg handlerCmd='${ runtime . handler } '
50+ ` ;
4851 console . log ( cmdLine ) ;
4952 childProcess . execSync ( cmdLine ) ;
5053 const cmdLogin = `aws ecr get-login-password --region ${ region } | docker login --username AWS --password-stdin ${ accountId } .dkr.ecr.${ region } .amazonaws.com` ;
@@ -127,7 +130,7 @@ const runtimeFromRuntimeId = (manifest, runtimeId) => {
127130 const runtime = manifest . find ( r => {
128131 return r . path === runtimeId ;
129132 } ) ;
130- if ( ! runtime ) {
133+ if ( ! runtime ) {
131134 throw "cound not find the runtime"
132135 }
133136 console . log ( runtime ) ;
You can’t perform that action at this time.
0 commit comments