Support OCI registry creds

Adds support to 3 environment variables:
- WAREWULF_OCI_USERNAME: registry user username
- WAREWULF_OCI_PASSWORD: registry user password
- WAREWULF_OCI_NOHTTPS: disable tls requirements (for local registries)

Note:
	This will default to ~/.docker/config.json for credentials and other docker
configurations on the system when no options are specified.
This commit is contained in:
Ian Kaneshiro
2021-02-16 17:50:27 -08:00
parent b6af0ccf70
commit db28555165
3 changed files with 65 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ func (p *puller) GenerateID(ctx context.Context, uri string) (string, error) {
return "", fmt.Errorf("unable to parse uri: %v", err)
}
src, err := ref.NewImageSource(ctx, nil)
src, err := ref.NewImageSource(ctx, p.sysCtx)
if err != nil {
return "", err
}