Help us shape the future of Go! Take the 2026 Go Developer Survey

dockerfile

package
v2.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dockerfile ingests Dockerfiles as Image nodes, with a references edge for every local path the image copies in.

What an image copies is what it runs. A Gradle monorepo's service image copies its own module and the shared modules it builds against (COPY of the service's module, COPY of the shared modules), which is the evidence that a shared module is a library of that service and not a service of its own — and that a client declared in the library is code the service runs. A compose service's build names its Dockerfile, so the same node ties a deployment to the source it was built from.

Index

Constants

View Source
const (
	KindImage = "Image"

	// ExtraRef marks an Image's references edge: RefCopy, Target "path:<src>"
	// with the source as written (relative to the build context, which the
	// Dockerfile does not name).
	ExtraRef = "dockerRef"
	RefCopy  = "copy"
)

Variables

This section is empty.

Functions

func IsDockerfile

func IsDockerfile(p string) bool

IsDockerfile reports whether a path is a Dockerfile: Dockerfile, Dockerfile.<variant> or <name>.Dockerfile.

func Parse

func Parse(p string, src []byte) parser.Result

Parse turns a Dockerfile into one Image node named after the directory holding it, and its COPY/ADD sources into references edges. Copies from another stage (--from=) and remote URLs are not local sources and are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL