File tree Expand file tree Collapse file tree
packages/cli/src/commands/template Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @e2b/cli ' : patch
3+ ---
4+
5+ added --no-cache option
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ export const buildCommand = new commander.Command('build')
173173 '--build-arg <args...>' ,
174174 'specify additional build arguments for the build command. The format should be <varname>=<value>.'
175175 )
176+ . option ( '--no-cache' , 'skip cache when building the template.' )
176177 . alias ( 'bd' )
177178 . action (
178179 async (
@@ -187,6 +188,7 @@ export const buildCommand = new commander.Command('build')
187188 cpuCount ?: number
188189 memoryMb ?: number
189190 buildArg ?: [ string ]
191+ noCache ?: boolean
190192 }
191193 ) => {
192194 try {
@@ -354,12 +356,15 @@ export const buildCommand = new commander.Command('build')
354356 . map ( ( [ key , value ] ) => `--build-arg "${ key } =${ value } "` )
355357 . join ( ' ' )
356358
359+ const noCache = opts . noCache ? '--no-cache' : ''
360+
357361 const cmd = [
358362 'docker build' ,
359363 `-f ${ dockerfileRelativePath } ` ,
360364 '--pull --platform linux/amd64' ,
361365 `-t docker.${ connectionConfig . domain } /e2b/custom-envs/${ templateID } :${ template . buildID } ` ,
362366 buildArgs ,
367+ noCache ,
363368 '.' ,
364369 ] . join ( ' ' )
365370
You can’t perform that action at this time.
0 commit comments