Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractServiceImageSpecs ¶ added in v0.1.4
func ExtractServiceImageSpecs(composeData []byte) (map[string]ServiceImageSpec, error)
ExtractServiceImageSpecs parses raw compose YAML and returns per-service image metadata before any preprocessing has been applied. This allows the graft step to populate .image quadlet files while the preprocessor strips pull_policy and platform fields that podlet does not understand.
func IsSELinuxEnabled ¶
func IsSELinuxEnabled() bool
IsSELinuxEnabled returns true if SELinux is detected as enabled on the host.
func SELinuxMode ¶
func SELinuxMode() string
SELinuxMode returns the detected SELinux mode string. Possible values: "Enforcing", "Permissive", "Disabled", "Unknown".
func SetSELinuxOverrides ¶
SetSELinuxOverrides overrides the SELinux detection result for testing. Pass nil for enabled to restore filesystem-based detection.
Types ¶
type ComposeFile ¶
type ComposeFile struct {
Services map[string]map[string]interface{} `yaml:"services"`
Networks map[string]interface{} `yaml:"networks,omitempty"`
Volumes map[string]map[string]interface{} `yaml:"volumes,omitempty"`
Config *ProjectConfig `yaml:"-"` // Internal use
}
ComposeFile represents the top-level structure of a docker-compose.yaml. Services and Volumes use generic maps to preserve all fields (including unknown ones like depends_on, restart, etc.) through the unmarshal/marshal cycle.
type Engine ¶
Engine handles the pre-processing of Compose files
type ProjectConfig ¶
ProjectConfig holds metadata injected during pre-processing
type ServiceImageSpec ¶ added in v0.1.4
type ServiceImageSpec struct {
ServiceName string // compose service name, e.g. "web"
Image string // normalized image, e.g. "docker.io/library/nginx:latest"
PullPolicy string // pull_policy value: always, missing, never, if_not_present, etc.
OS string // from platform field, e.g. "linux"
Arch string // from platform field, e.g. "amd64"
Variant string // from platform field, e.g. "v8"
}
ServiceImageSpec holds the compose fields that map to a Podman .image quadlet.
type StringMap ¶
StringMap stores key-value pairs and supports both YAML map and list formats during unmarshaling (e.g. `KEY: value` or `- KEY=value`). During marshaling it always outputs as a list, which is the standard Docker Compose format and what downstream tools like podlet expect.