MCPcopy Index your code
hub / github.com/dagger/dagger / NewImage

Function NewImage

sdk/python/runtime/image.go:96–105  ·  view source on GitHub ↗

NewImage parses a string into a named reference transforming a familiar name from Docker UI to a fully qualified reference.

(ref string)

Source from the content-addressed store, hash-verified

94// NewImage parses a string into a named reference transforming a familiar
95// name from Docker UI to a fully qualified reference.
96func NewImage(ref string) (Image, error) {
97 named, err := reference.ParseNormalizedNamed(ref)
98 if err != nil {
99 return Image{}, err
100 }
101 if named == nil {
102 return Image{}, fmt.Errorf("invalid image ref %q", ref)
103 }
104 return Image{named: named}, nil
105}
106
107// extractImages reads from the bundled Dockerfile to extract the default docker
108// image references.

Callers 3

UnmarshalJSONMethod · 0.85
extractImagesFunction · 0.85
parseBaseImageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected