Skip to content

debug: fix short-form custom command name on --invoke isn't used - #2026

Merged
tonistiigi merged 1 commit into
docker:masterfrom
ktock:fix-invoke-flag
Aug 30, 2023
Merged

tonistiigi merged 1 commit into
docker:masterfrom
ktock:fix-invoke-flag

Conversation

@ktock

@ktock ktock commented Aug 30, 2023 •

Copy link
Copy Markdown
Collaborator

This fixes the bug that --invoke ignores command name specified as the short-form argument. Sorry, this seems introduced in #1970 that uses InvokeConfig.NoCmd in an incorrect way in the short-form flag 🙏 .

master branch:

Command name (ps) on the short-form flag is ignored.

$ BUILDX_EXPERIMENTAL=1 /tmp/out/buildx build --invoke ps /tmp/ctx3/
...
Launching interactive container. Press Ctrl-a-c to switch to monitor console
Interactive container was restarted with process "a41yfa5q4d20h1ezin01ndcun". Press Ctrl-a-c to switch to the new container
root@buildkitsandbox:/# 

This PR:

Command name (ps) is enabled.

$ BUILDX_EXPERIMENTAL=1 /tmp/out/buildx build --invoke ps /tmp/ctx3/
...
Launching interactive container. Press Ctrl-a-c to switch to monitor console
Interactive container was restarted with process "su15exc88brmlsj7ae7c77nzv". Press Ctrl-a-c to switch to the new container
    PID TTY          TIME CMD
      1 pts/0    00:00:00 ps

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@tonistiigi
tonistiigi merged commit 76119b0 into docker:master Aug 30, 2023
@ktock
ktock deleted the fix-invoke-flag branch August 31, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants