diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/options.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go index 6344e1acc..48888a2f2 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -64,15 +64,22 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption { setField = true } + graphDriverChanged := false if config.GraphDriverName != "" { rt.storageConfig.GraphDriverName = config.GraphDriverName rt.storageSet.GraphDriverNameSet = true setField = true + graphDriverChanged = true } if config.GraphDriverOptions != nil { - rt.storageConfig.GraphDriverOptions = make([]string, len(config.GraphDriverOptions)) - copy(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions) + if graphDriverChanged { + rt.storageConfig.GraphDriverOptions = make([]string, len(config.GraphDriverOptions)) + copy(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions) + } else { + // append new options after what is specified in the config files + rt.storageConfig.GraphDriverOptions = append(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions...) + } setField = true } |