File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ var execCmd = &cobra.Command{
2323
2424Example:
2525 runshell exec ls -l
26- runshell exec --env KEY=VALUE --workdir /tmp ls -l` ,
26+ runshell exec --env KEY=VALUE --workdir /tmp ls -l
27+ runshell exec --docker-image ubuntu:latest ls -l` ,
2728 Args : cobra .MinimumNArgs (1 ),
2829 RunE : runExec ,
2930}
@@ -33,6 +34,7 @@ func init() {
3334
3435 execCmd .Flags ().StringVar (& workDir , "workdir" , "" , "Working directory for command execution" )
3536 execCmd .Flags ().StringArrayVar (& envVars , "env" , nil , "Environment variables (KEY=VALUE)" )
37+ execCmd .Flags ().StringVar (& dockerImage , "docker-image" , "" , "Docker image to run command in" )
3638
3739 // 禁用标志解析,这样可以正确处理命令参数中的标志
3840 execCmd .Flags ().SetInterspersed (false )
You can’t perform that action at this time.
0 commit comments