We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc88c55 commit b71bb87Copy full SHA for b71bb87
pkg/config/engine/docker/docker.go
@@ -105,7 +105,20 @@ func (c Config) DefaultRuntime() string {
105
106
// EnableCDI sets features.cdi to true in the docker config.
107
func (c *Config) EnableCDI() {
108
- (*c)["features"] = map[string]bool{"cdi": true}
+ if c == nil {
109
+ return
110
+ }
111
+ config := *c
112
+
113
+ features, ok := config["features"].(map[string]bool)
114
+ if !ok {
115
+ features = make(map[string]bool)
116
117
+ features["cdi"] = true
118
119
+ config["features"] = features
120
121
+ *c = config
122
}
123
124
// RemoveRuntime removes a runtime from the docker config
0 commit comments