Add Docker subcommand with cross-platform container execution#727
Closed
nchapagain001 wants to merge 9 commits into
Closed
Conversation
- Use dism with elevated PowerShell to enable Windows containers feature on both Desktop and Server - Profile INSTALL-DOCKER.json successfully enables Hyper-V containers on Windows Desktop and Server - Windows containers feature is prerequisite for Docker Desktop and Windows Server Docker - Simplified Windows path to focus on enabling the feature; Docker engine installation on Desktop should use Docker Desktop installer
- Remove Windows Docker support (containers feature setup) - Profile INSTALL-DOCKER.json now Linux-only (Ubuntu) - Removed Windows-specific tests; kept 2 Linux tests - Cleaner implementation focused on single platform
Adding INSTALL-DOCKER.json
…penssl-profile Add Docker integration: CLI mode and DockerExecution wrapper component
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.
Summary
Adds the
dockersubcommand to VirtualClient, enabling workload profiles to runinside Docker containers with automatic cross-platform support.
./VirtualClient docker --image=ubuntu:noble --profile=GET-STARTED-OPENSSL.jsonroutes all profile action components into the container via
docker execdocker image inspectsetsVC_DOCKER_PLATFORMandVC_DOCKER_ARCHso package resolution uses container binaries (e.g.,linux-x64)even when the host is Windows
DockerExecutionare rejected immediately with a clear error("double Docker") — the
dockersubcommand handles routing transparentlyWhat Changed
DockerCommand.cs— newdockerCLI subcommand: creates container, installsdeps on host (volume-mounted into container), then executes each profile action via
docker exec <id> /app/VirtualClient.Main --component={type}; validates profile hasno
DockerExecutionbefore any container is createdDockerContainerClient.cs— new Docker client withCreateContainerAsync,ExecuteInContainerAsync,InspectImageAsync, andParsePlatformFromInspectJsonDockerExecution.cs— component for standalone container execution (whenVC_DOCKER_CONTAINER_IDis set externally, without thedockersubcommand)VirtualClientComponent.cs—Platform,CpuArchitecture, andPlatformArchitectureNamenow checkVC_DOCKER_PLATFORM/VC_DOCKER_ARCHenv varsfirst, so
IsSupported()andToPlatformSpecificPath()evaluate against containerplatform rather than host platform
Test Plan
dotnet test— all existing tests passdotnet test --filter DockerContainerClientTests— 13 parser tests passdotnet test --filter VirtualClientComponentTests— 38 component tests passVirtualClient docker --image=ubuntu:noble --profile=GET-STARTED-OPENSSL.json --iterations=1logsdocker execin outputVirtualClient docker --image=ubuntu:noble --profile=PERF-OPENSSL-DOCKER.jsonfails immediately with double-Docker error