GetRegistryEndpoint retrieves the correct registry url
(ctx context.Context, registryURL string)
| 13 | |
| 14 | // GetRegistryEndpoint retrieves the correct registry url |
| 15 | func (c *client) GetRegistryEndpoint(ctx context.Context, registryURL string) (bool, string, error) { |
| 16 | authServer := c.getOfficialServer(ctx) |
| 17 | if registryURL == "" || registryURL == "hub.docker.com" { |
| 18 | registryURL = authServer |
| 19 | } |
| 20 | |
| 21 | return registryURL == authServer, registryURL, nil |
| 22 | } |
| 23 | |
| 24 | // GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper |
| 25 | func (c *client) GetAuthConfig(ctx context.Context, registryURL string, checkCredentialsStore bool) (*dockerregistry.AuthConfig, error) { |