refactor: docker engine with options

This commit is contained in:
Bo-Yi Wu authored and Jason Song committed 2022-11-24 15:36:51 +08:00
1 parent 4eb5213294
commit 14a345504f
3 files changed
+45 -18

No files matched your search

+2 -3
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 {