Merge pull request #50708 from austinvazquez/restore-docker-driver-env-var

Restore DOCKER_DRIVER environment variable
This commit is contained in:
Sebastiaan van Stijn
2025-08-13 14:11:26 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -1098,7 +1098,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
// Unix platforms however run a single graphdriver for all containers, and it can
// be set through an environment variable, a daemon start parameter, or chosen through
// initialization of the layerstore through driver priority order for example.
driverName := os.Getenv("DOCKER_GRAPHDRIVER")
driverName := os.Getenv("DOCKER_DRIVER")
if isWindows {
if driverName == "" {
driverName = cfgStore.GraphDriver
@@ -1120,7 +1120,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
}
} else if driverName != "" {
log.G(ctx).Infof("Setting the storage driver from the $DOCKER_GRAPHDRIVER environment variable (%s)", driverName)
log.G(ctx).Infof("Setting the storage driver from the $DOCKER_DRIVER environment variable (%s)", driverName)
} else {
driverName = cfgStore.GraphDriver
}

View File

@@ -29,7 +29,7 @@ func testMigrateSnapshotter(t *testing.T, graphdriver, snapshotter string) {
skip.If(t, runtime.GOOS != "linux")
t.Setenv("DOCKER_MIGRATE_SNAPSHOTTER_THRESHOLD", "200M")
t.Setenv("DOCKER_GRAPHDRIVER", "")
t.Setenv("DOCKER_DRIVER", "")
ctx := testutil.StartSpan(baseContext, t)
@@ -93,7 +93,7 @@ func TestMigrateSaveLoad(t *testing.T) {
skip.If(t, runtime.GOOS != "linux")
t.Setenv("DOCKER_MIGRATE_SNAPSHOTTER_THRESHOLD", "200M")
t.Setenv("DOCKER_GRAPHDRIVER", "")
t.Setenv("DOCKER_DRIVER", "")
var (
ctx = testutil.StartSpan(baseContext, t)