refactor: docker engine with options

This commit is contained in:
Bo-Yi Wu
2022-08-13 14:30:05 +08:00
committed by Jason Song
parent 4eb5213294
commit 14a345504f
3 changed files with 45 additions and 18 deletions

View File

@ -137,8 +137,7 @@ func runDaemon(ctx context.Context, input *Input) func(cmd *cobra.Command, args
initLogging(cfg)
opts := engine.Opts{}
engine, err := engine.NewEnv(opts)
engine, err := engine.New()
if err != nil {
log.WithError(err).
Fatalln("cannot load the docker engine")
@ -161,7 +160,7 @@ func runDaemon(ctx context.Context, input *Input) func(cmd *cobra.Command, args
count++
if count == 5 {
log.WithError(err).
Fatalln("retry count reached")
Fatalf("retry count reached: %d", count)
}
time.Sleep(time.Second)
} else {