You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buildx/commands
Tianon Gravi 62bfb19db4 Fix a couple `--invoke` entrypoint interaction bugs
When running `--invoke` against images that have `Cmd` set, the interactions with `Entrypoint` start to cause issues like the following:

    /usr/local/bin/bash: /usr/local/bin/bash: cannot execute binary file

Or:

    sh: can't open 'bash': No such file or directory

This patch fixes those by explicitly setting `Cmd` to be empty if it is unspecified and `Entrypoint` is being set, which matches `docker`'s behavior:

    $ docker image inspect --format '{{ json .Config.Entrypoint }} + {{ json .Config.Cmd }}' bash
    ["docker-entrypoint.sh"] + ["bash"]
    $ docker create --name foo --entrypoint bash bash
    $ docker container inspect --format '{{ json .Config.Entrypoint }} + {{ json .Config.Cmd }}' foo
    ["bash"] + null
    $ docker rm foo
    $ docker create --name foo bash ls
    $ docker container inspect --format '{{ json .Config.Entrypoint }} + {{ json .Config.Cmd }}' foo
    ["docker-entrypoint.sh"] + ["ls"]

(There are still some weird edge cases in the interaction between the `InvokeConfig` and the original image config, but this fixes the most irritating for me and the rest are going to be deeper changes that are possibly less acceptable. 😅)

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2 years ago
..
imagetools cli: set default completion 2 years ago
bake.go build: display build details link 2 years ago
build.go Fix a couple `--invoke` entrypoint interaction bugs 2 years ago
create.go Merge pull request #1727 from crazy-max/cmd-completion 2 years ago
create_test.go Fix tolerations not parsing its options correctly, add tests 3 years ago
debug-shell.go controller: replace logrus status messages with progress messages 2 years ago
diskusage.go cli: set default completion 2 years ago
inspect.go inspect: display builder features 2 years ago
install.go cli: set default completion 2 years ago
ls.go cli: set default completion 2 years ago
prune.go cli: set default completion 2 years ago
rm.go cli: add completion to list builder names 2 years ago
root.go Merge pull request #1727 from crazy-max/cmd-completion 2 years ago
stop.go cli: add completion to list builder names 2 years ago
uninstall.go cli: set default completion 2 years ago
use.go cli: add completion to list builder names 2 years ago
version.go cli: set default completion 2 years ago