BuildManifestURL (manifest/manifest.go)

watchtower · pkg/registry/manifest/manifest.go · go · Apache-2.0
infra, tag:knn-classified

Constructs the HTTPS URL for a Docker image manifest given a container object, handling parsing and validation.

// Source: https://github.com/containrrr/watchtower | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package manifest

import (
	"errors"
	"fmt"
	url2 "net/url"

	"github.com/containrrr/watchtower/pkg/registry/helpers"
	"github.com/containrrr/watchtower/pkg/types"
	ref "github.com/distribution/reference"
	"github.com/sirupsen/logrus"
)

// BuildManifestURL from raw image data
func BuildManifestURL(container types.Container) (string, error) {
	normalizedRef, err := ref.ParseDockerRef(container.ImageName())
	if err != nil {
		return "", err
	}
	normalizedTaggedRef, isTagged := normalizedRef.(ref.NamedTagged)
	if !isTagged {
		return "", errors.New("Parsed container image ref has no t

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key