diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 380548c..41bb53c 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -477,9 +477,13 @@ func (rc *RunContext) startJobContainer() common.Executor { return nil } + lifetime := fmt.Sprint(rc.Config.ContainerMaxLifetime.Round(time.Second).Seconds()) + if lifetime == "0" { + lifetime = "infinity" + } rc.JobContainer = container.NewContainer(&container.NewContainerInput{ Cmd: nil, - Entrypoint: []string{"/bin/sleep", fmt.Sprint(rc.Config.ContainerMaxLifetime.Round(time.Second).Seconds())}, + Entrypoint: []string{"/bin/sleep", lifetime}, WorkingDir: ext.ToContainerPath(rc.Config.Workdir), Image: image, Username: username,