Skip to main content

Module windows_image_resolver

Module windows_image_resolver 

Source
Expand description

Windows (Chocolatey) package resolver — counterpart to macos_image_resolver.

On Windows containers (WCOW), Linux package manager invocations (apt-get install, dnf install, apk add) inside a Dockerfile cannot run natively. This module resolves Linux package names against the RepoSources Chocolatey shard files published at https://zachhandley.github.io/RepoSources/maps/choco/<distro>/<shard>.json and returns the equivalent Chocolatey package name so the builder can emit choco install <pkg> lines in the WCOW lowered Dockerfile.

The shard layout, on-disk cache, and HMAC cache-warming hint mirror the macOS resolver in macos_image_resolver.rs. The Windows resolver lives in a separate cache subdirectory (package-maps-choco-v1) so its TTL/version is independent from the macOS resolver.

Structs§

ChocoMapMetadata
Metadata header inside a Chocolatey shard JSON file.
ChocoMapShard
JSON shape of a Chocolatey package-map shard file as published by RepoSources.

Enums§

ResolvedWindowsPackage
A resolved Windows package, after consulting both the relocatable-artifact discovery endpoint and the Chocolatey shard map.

Functions§

resolve_chocolatey_package
Resolve a single Linux package name to its Chocolatey equivalent.
resolve_chocolatey_packages
Bulk-resolve a list of Linux packages.
resolve_windows_packages
Resolve a batch of Linux package names to ResolvedWindowsPackages.
rewrite_image_for_windows
Rewrite a generic image reference to the equivalent prebuilt ZLayer Windows image under [ZLAYER_REGISTRY], parameterized by an LTSC line.