DockerfileFactoryContext
Handle
Provides context for Dockerfile factory functions.
type DockerfileFactoryContext interface{}Properties
property
ResourceResourcegetGets the resource for which the Dockerfile is being generated. This allows factory functions to query resource annotations and properties to customize the generated Dockerfile.
var containerAnnotation = context.Resource.Annotations.OfType<ContainerImageAnnotation>().FirstOrDefault(); var baseImage = containerAnnotation?.Image ?? "alpine:latest"; Resource() Resource