File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
ProcessMaker/Console/Commands Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class BuildScriptExecutors extends Command
2222 {lang : The ID or language of the script executor}
2323 {user? : The user ID to send the broadcast event to}
2424 {--rebuild : Rebuild the docker image}
25+ {--no-cache : Do not use cache when building the docker image}
2526 {--build-args= : The build arguments for the docker build command} ' ;
2627
2728 /**
@@ -159,9 +160,13 @@ public function buildExecutor()
159160
160161 $ this ->info ('Building the docker executor ' );
161162
163+ // Add the --no-cache flag if the option is set
164+ $ noCache = $ this ->option ('no-cache ' ) ? '--no-cache ' : '' ;
165+
162166 $ image = $ scriptExecutor ->dockerImageName ();
163- $ command = Docker::command () .
164- " build --build-arg SDK_DIR=./sdk -t {$ image } -f {$ packagePath }/Dockerfile.custom {$ packagePath }" ;
167+
168+ $ command = Docker::command () . " build {$ noCache }" ;
169+ $ command .= " --build-arg SDK_DIR=./sdk -t {$ image } -f {$ packagePath }/Dockerfile.custom {$ packagePath }" ;
165170
166171 $ buildArgs = $ this ->getBuildArgs ();
167172
You can’t perform that action at this time.
0 commit comments