MCPcopy
hub / github.com/docker/compose / encodedAuth

Function encodedAuth

pkg/compose/pull.go:280–291  ·  pkg/compose/pull.go::encodedAuth
(ref reference.Named, configFile authProvider)

Source from the content-addressed store, hash-verified

278}
279
280func encodedAuth(ref reference.Named, configFile authProvider) (string, error) {
281 authConfig, err := configFile.GetAuthConfig(registry.GetAuthConfigKey(reference.Domain(ref)))
282 if err != nil {
283 return "", err
284 }
285
286 buf, err := json.Marshal(authConfig)
287 if err != nil {
288 return "", err
289 }
290 return base64.URLEncoding.EncodeToString(buf), nil
291}
292
293func (s *composeService) pullRequiredImages(ctx context.Context, project *types.Project, images map[string]api.ImageSummary, quietPull bool) error {
294 needPull := map[string]types.ServiceConfig{}

Callers 2

pullServiceImageMethod · 0.85
ImageDigestResolverFunction · 0.85

Calls 2

GetAuthConfigKeyFunction · 0.92
GetAuthConfigMethod · 0.80

Tested by

no test coverage detected