Skip to content

Commit f2a23b1

Browse files
committed
Extend the default value of --startup-timeout to 1m
Signed-off-by: Kohei Tokunaga <[email protected]>
1 parent 70fa10d commit f2a23b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/nerdctl/builder/builder.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"os"
2222
"os/exec"
2323
"strings"
24+
"time"
2425

2526
"github.com/docker/go-units"
2627
"github.com/spf13/cobra"
@@ -146,6 +147,7 @@ func debugCommand() *cobra.Command {
146147
cmd.Flags().String("image", "", "Image to use for debugging stage")
147148
cmd.Flags().StringArray("ssh", nil, "Allow forwarding SSH agent to the build. Format: default|<id>[=<socket>|<key>[,<key>]]")
148149
cmd.Flags().StringArray("secret", nil, "Expose secret value to the build. Format: id=secretname,src=filepath")
150+
helpers.AddDurationFlag(cmd, "startup-timeout", nil, 1*time.Minute, "", "Timeout for starting up buildg")
149151
return cmd
150152
}
151153

@@ -167,6 +169,12 @@ func debugAction(cmd *cobra.Command, args []string) error {
167169
buildgArgs = append([]string{"--debug"}, buildgArgs...)
168170
}
169171

172+
startupTimeout, err := cmd.Flags().GetDuration("startup-timeout")
173+
if err != nil {
174+
return err
175+
}
176+
buildgArgs = append(buildgArgs, "--startup-timeout="+startupTimeout.String())
177+
170178
if file, err := cmd.Flags().GetString("file"); err != nil {
171179
return err
172180
} else if file != "" {

0 commit comments

Comments
 (0)