Browse code

Restore DOCKER_DRIVER environment variable for storage driver configuration.

This change restores the environment variable configuration of daemon storage driver through the DOCKER_DRIVER environment variable.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>

Austin Vazquez authored on 2025/08/13 06:35:31
Showing 2 changed files
... ...
@@ -1098,7 +1098,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
1098 1098
 	// Unix platforms however run a single graphdriver for all containers, and it can
1099 1099
 	// be set through an environment variable, a daemon start parameter, or chosen through
1100 1100
 	// initialization of the layerstore through driver priority order for example.
1101
-	driverName := os.Getenv("DOCKER_GRAPHDRIVER")
1101
+	driverName := os.Getenv("DOCKER_DRIVER")
1102 1102
 	if isWindows {
1103 1103
 		if driverName == "" {
1104 1104
 			driverName = cfgStore.GraphDriver
... ...
@@ -1120,7 +1120,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
1120 1120
 
1121 1121
 		}
1122 1122
 	} else if driverName != "" {
1123
-		log.G(ctx).Infof("Setting the storage driver from the $DOCKER_GRAPHDRIVER environment variable (%s)", driverName)
1123
+		log.G(ctx).Infof("Setting the storage driver from the $DOCKER_DRIVER environment variable (%s)", driverName)
1124 1124
 	} else {
1125 1125
 		driverName = cfgStore.GraphDriver
1126 1126
 	}
... ...
@@ -29,7 +29,7 @@ func testMigrateSnapshotter(t *testing.T, graphdriver, snapshotter string) {
29 29
 	skip.If(t, runtime.GOOS != "linux")
30 30
 
31 31
 	t.Setenv("DOCKER_MIGRATE_SNAPSHOTTER_THRESHOLD", "200M")
32
-	t.Setenv("DOCKER_GRAPHDRIVER", "")
32
+	t.Setenv("DOCKER_DRIVER", "")
33 33
 
34 34
 	ctx := testutil.StartSpan(baseContext, t)
35 35
 
... ...
@@ -93,7 +93,7 @@ func TestMigrateSaveLoad(t *testing.T) {
93 93
 	skip.If(t, runtime.GOOS != "linux")
94 94
 
95 95
 	t.Setenv("DOCKER_MIGRATE_SNAPSHOTTER_THRESHOLD", "200M")
96
-	t.Setenv("DOCKER_GRAPHDRIVER", "")
96
+	t.Setenv("DOCKER_DRIVER", "")
97 97
 
98 98
 	var (
99 99
 		ctx         = testutil.StartSpan(baseContext, t)