MCPcopy Create free account
hub / github.com/containerd/nerdctl / GetEffectiveSourcePolicyFile

Function GetEffectiveSourcePolicyFile

pkg/cmd/builder/build.go:200–205  ·  view source on GitHub ↗

GetEffectiveSourcePolicyFile returns the effective source policy file path. If optionValue is set, it takes precedence. Otherwise, the EXPERIMENTAL_BUILDKIT_SOURCE_POLICY environment variable is used for Docker Buildx compatibility.

(optionValue string)

Source from the content-addressed store, hash-verified

198// If optionValue is set, it takes precedence. Otherwise, the EXPERIMENTAL_BUILDKIT_SOURCE_POLICY
199// environment variable is used for Docker Buildx compatibility.
200func GetEffectiveSourcePolicyFile(optionValue string) string {
201 if optionValue != "" {
202 return optionValue
203 }
204 return os.Getenv("EXPERIMENTAL_BUILDKIT_SOURCE_POLICY")
205}
206
207func generateBuildctlArgs(ctx context.Context, client *containerd.Client, options types.BuilderBuildOptions) (buildCtlBinary string,
208 buildctlArgs []string, needsLoading bool, metaFile string, tags []string, cleanup func(), err error) {

Callers 2

generateBuildctlArgsFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…