@@ -12,7 +12,6 @@ import (
1212 "strings"
1313 "syscall"
1414
15- "github.com/docker/docker/client"
1615 fioconfig "github.com/foundriesio/fioconfig/app"
1716 "github.com/foundriesio/fioconfig/sotatoml"
1817 cfg "github.com/foundriesio/fioup/pkg/config"
@@ -21,10 +20,8 @@ import (
2120)
2221
2322const (
24- lockFileName = "fioup.lock"
25- lockFlagKey = "lock-flag"
26- requireOverlay2Key = "require-overlay2"
27- overlay2DriverName = "overlay2"
23+ lockFileName = "fioup.lock"
24+ lockFlagKey = "lock-flag"
2825)
2926
3027var (
6461 if l := cmd .Annotations [lockFlagKey ]; l == "true" {
6562 cobra .CheckErr (acquireLock ())
6663 }
67-
68- // If the "require overlay2" flag is set, then check if the Docker storage driver is overlay2
69- if l := cmd .Annotations [requireOverlay2Key ]; l == "true" {
70- cli , err := client .NewClientWithOpts (client .FromEnv )
71- cobra .CheckErr (err )
72-
73- info , err := cli .Info (cmd .Context ())
74- cobra .CheckErr (err )
75- if info .Driver != overlay2DriverName {
76- cobra .CheckErr (fmt .Errorf ("overlay2 storage driver is required, detected: %s" , info .Driver ))
77- }
78- slog .Debug ("Detected storage driver" , "driver" , info .Driver )
79- }
8064 },
8165 }
8266)
@@ -102,7 +86,6 @@ func Execute() error {
10286 rootCmd .PersistentPreRun (rootCmd , nil )
10387 os .Exit (runDockerCredsHelper ())
10488 }
105-
10689 return rootCmd .Execute ()
10790}
10891
0 commit comments