Repository navigation
Add --docker-arg option for global Docker CLI arguments - #1304
Merged
Christof Marti (chrmarti) merged 3 commits intoOct 30, 2026
Merged
Christof Marti (chrmarti) merged 3 commits into
Christof Marti (chrmarti) merged 3 commits into
Conversation
Accept --docker-arg on every command that takes --docker-path (up, set-up, build, run-user-commands, read-configuration, exec and upgrade) for consistency with --docker-path. Prefix the Docker Compose plugin invocation (docker <args> compose) but not a standalone docker-compose executable, and keep the arguments on Docker CLI parameters derived from resolver parameters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
force-pushed
the
user/shawn/wslc-debug-support-session-args
branch
from
October 30, 2026 11:37
53a7124 to
7251b0a
Compare
Christof Marti (chrmarti)
previously approved these changes
Oct 30, 2026
Run the built CLI with an unreachable DOCKER_HOST and the real endpoint passed with --docker-arg=-H so any Docker invocation that drops the arguments fails. Cover up, exec, set-up, run-user-commands, read-configuration, build and the Docker Compose plugin. The tests use execFile without a shell, so they also run on Windows. Also include the Docker arguments when rewriting container exec log lines to "Run in container:". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Abdurrahmaan Iqbal (abdurriq)
approved these changes
Oct 30, 2026
Christof Marti (chrmarti)
merged commit Oct 30, 2026
a190a3f
into
devcontainers:main
68 of 69 checks passed
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 an optional, repeatable
--docker-argoption to every command that accepts--docker-path(up,set-up,build,run-user-commands,read-configuration,execandupgrade). Each value is passed as a global argument before the subcommand of every Docker CLI invocation.This enables Dev Containers to target existing WSLC SDK Sessions using
wslc --session <name>. It also works for other global CLI options such as Docker's--contextor Podman's--connection.This PR needs to be used together with this dev container PR.
Changes
docker <args> compose ..., including thecompose versionprobe), but not a standalone--docker-compose-pathexecutable.Example
devcontainer set-up \ --docker-path wslc \ --docker-arg=--session \ --docker-arg="SDK Session" \ --container-id CONTAINER_IDValidation
set-upandrun-user-commandsagainst an SDK-created container.