MCPcopy Index your code
hub / github.com/docker/cli / buildPullConfig

Function buildPullConfig

cli/command/plugin/install.go:54–77  ·  view source on GitHub ↗
(dockerCLI command.Cli, opts pluginOptions)

Source from the content-addressed store, hash-verified

52}
53
54func buildPullConfig(dockerCLI command.Cli, opts pluginOptions) (client.PluginInstallOptions, error) {
55 // Names with both tag and digest will be treated by the daemon
56 // as a pull by digest with a local name for the tag
57 // (if no local name is provided).
58 ref, err := reference.ParseNormalizedNamed(opts.remote)
59 if err != nil {
60 return client.PluginInstallOptions{}, err
61 }
62
63 encodedAuth, err := command.RetrieveAuthTokenFromImage(dockerCLI.ConfigFile(), ref.String())
64 if err != nil {
65 return client.PluginInstallOptions{}, err
66 }
67
68 return client.PluginInstallOptions{
69 RegistryAuth: encodedAuth,
70 RemoteRef: ref.String(),
71 Disabled: opts.disable,
72 AcceptAllPermissions: opts.grantPerms,
73 AcceptPermissionsFunc: acceptPrivileges(dockerCLI, opts.remote),
74 PrivilegeFunc: nil,
75 Args: opts.args,
76 }, nil
77}
78
79func runInstall(ctx context.Context, dockerCLI command.Cli, opts pluginOptions) error {
80 var localName string

Callers 2

runInstallFunction · 0.85
runUpgradeFunction · 0.85

Calls 3

acceptPrivilegesFunction · 0.85
ConfigFileMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…