Add execution strategy pattern to support Docker, Wine, WSL, and Windows Sandbox#279
Closed
Add execution strategy pattern to support Docker, Wine, WSL, and Windows Sandbox#279
Conversation
Copilot
AI
changed the title
[WIP] Generalize ZeroInstall.Services.Executors to support multiple environments
Add execution strategy pattern to support Docker, Wine, WSL, and Windows Sandbox
Feb 6, 2026
…e, WSL, and Windows Sandbox Co-authored-by: bastianeicher <414366+bastianeicher@users.noreply.github.com>
b8fca71 to
17fb69c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executors currently execute directly on the host OS. This adds support for running implementations in containerized/virtualized environments (Docker, Wine, WSL, Windows Sandbox) with proper path mapping and binding translation.
Changes
New interfaces
IExecutionStrategy: Strategy for executing in specific environmentsIExecutionContext: Abstracts process execution contextIPathMapper: Translates paths between host and target environmentsStrategy implementations
NativeProcessStrategy: Existing behavior (default)DockerStrategy: Mounts implementations as volumes, maps to/0install/*pathsWineStrategy: Maps Linux paths to Wine Z:\ drive, handles WINEPREFIXWSLStrategy: Converts Windows paths to/mnt/*, invokes via wsl.exeWindowsSandboxStrategy: Generates .wsb config, uses SHA256 for deterministic path mappingIntegration
Executoraccepts optionalIExecutionStrategyparameterEnvironmentBinding,ExecutableInVar,ExecutableInPathwith appropriate path translationUsage
All bindings are translated to target environment paths automatically. Custom strategies can be implemented via
IExecutionStrategy.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.