@@ -16,32 +16,33 @@ import (
1616
1717// ConfigFile ~/.docker/config.json file info
1818type ConfigFile struct {
19- AuthConfigs map [string ]types.AuthConfig `json:"auths"`
20- HTTPHeaders map [string ]string `json:"HttpHeaders,omitempty"`
21- PsFormat string `json:"psFormat,omitempty"`
22- ImagesFormat string `json:"imagesFormat,omitempty"`
23- NetworksFormat string `json:"networksFormat,omitempty"`
24- PluginsFormat string `json:"pluginsFormat,omitempty"`
25- VolumesFormat string `json:"volumesFormat,omitempty"`
26- StatsFormat string `json:"statsFormat,omitempty"`
27- DetachKeys string `json:"detachKeys,omitempty"`
28- CredentialsStore string `json:"credsStore,omitempty"`
29- CredentialHelpers map [string ]string `json:"credHelpers,omitempty"`
30- Filename string `json:"-"` // Note: for internal use only
31- ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"`
32- ServicesFormat string `json:"servicesFormat,omitempty"`
33- TasksFormat string `json:"tasksFormat,omitempty"`
34- SecretFormat string `json:"secretFormat,omitempty"`
35- ConfigFormat string `json:"configFormat,omitempty"`
36- NodesFormat string `json:"nodesFormat,omitempty"`
37- PruneFilters []string `json:"pruneFilters,omitempty"`
38- Proxies map [string ]ProxyConfig `json:"proxies,omitempty"`
39- Experimental string `json:"experimental,omitempty"`
40- CurrentContext string `json:"currentContext,omitempty"`
41- CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
42- Plugins map [string ]map [string ]string `json:"plugins,omitempty"`
43- Aliases map [string ]string `json:"aliases,omitempty"`
44- Features map [string ]string `json:"features,omitempty"`
19+ AuthConfigs map [string ]types.AuthConfig `json:"auths"`
20+ HTTPHeaders map [string ]string `json:"HttpHeaders,omitempty"`
21+ PsFormat string `json:"psFormat,omitempty"`
22+ ImagesFormat string `json:"imagesFormat,omitempty"`
23+ NetworksFormat string `json:"networksFormat,omitempty"`
24+ PluginsFormat string `json:"pluginsFormat,omitempty"`
25+ VolumesFormat string `json:"volumesFormat,omitempty"`
26+ StatsFormat string `json:"statsFormat,omitempty"`
27+ DetachKeys string `json:"detachKeys,omitempty"`
28+ CredentialsStore string `json:"credsStore,omitempty"`
29+ CredentialHelpers map [string ]string `json:"credHelpers,omitempty"`
30+ Filename string `json:"-"` // Note: for internal use only
31+ ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"`
32+ ServicesFormat string `json:"servicesFormat,omitempty"`
33+ TasksFormat string `json:"tasksFormat,omitempty"`
34+ SecretFormat string `json:"secretFormat,omitempty"`
35+ ConfigFormat string `json:"configFormat,omitempty"`
36+ NodesFormat string `json:"nodesFormat,omitempty"`
37+ PruneFilters []string `json:"pruneFilters,omitempty"`
38+ Proxies map [string ]ProxyConfig `json:"proxies,omitempty"`
39+ Experimental string `json:"experimental,omitempty"`
40+ CurrentContext string `json:"currentContext,omitempty"`
41+ CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
42+ Plugins map [string ]map [string ]string `json:"plugins,omitempty"`
43+ Aliases map [string ]string `json:"aliases,omitempty"`
44+ Features map [string ]string `json:"features,omitempty"`
45+ SocketCredentialStoreAddr string `json:"-"`
4546}
4647
4748// ProxyConfig contains proxy configuration settings
@@ -254,6 +255,9 @@ func decodeAuth(authStr string) (string, string, error) {
254255// GetCredentialsStore returns a new credentials store from the settings in the
255256// configuration file
256257func (configFile * ConfigFile ) GetCredentialsStore (registryHostname string ) credentials.Store {
258+ if configFile .SocketCredentialStoreAddr != "" {
259+ return credentials .NewSocketStore (configFile .SocketCredentialStoreAddr )
260+ }
257261 if helper := getConfiguredCredentialStore (configFile , registryHostname ); helper != "" {
258262 return newNativeStore (configFile , helper )
259263 }
0 commit comments