DockerCLI/cli/command/image
Sebastiaan van Stijn e3d93058fd
build: remove PersistentPreRunE hack for experimental --platform
This hack was added in an attempt to continue supporting the experimental
(non-buildkit) `--platform` option, by dynamically updating the API version
required if buildkit isn't enabled.

This hack didn't work, however, because at the moment the override is
added, the command is not yet attached to the "root" (`docker`) command,
and because of that, the command itself is the `root` command;
`cmd.Root()` returned the `build` command.

As a result, validation steps defined as `PersistentPreRunE` on the root
command were not executed, causing invalid flags/options to not producing
an error.

Attempts to use an alternative approach (for example, cobra supports both
a `PersistentPreRun` and `PersistentPreRunE`) did not work either, because
`PersistentPreRunE` takes precedence over `PersistentPreRun`, and only one
will be executed.

Now that `--platform` should be supported for other cases than just for
experimental (LCOW), let's remove the 'experimental' check, and just assume
it's supported for API v1.32 and up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-16 14:58:11 +01:00
..
build bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
testdata formatter: reduce minimum width for columns in table-view 2020-08-31 16:31:15 +02:00
build.go build: remove PersistentPreRunE hack for experimental --platform 2020-11-16 14:58:11 +01:00
build_buildkit.go vendor: buildkit 4d1f260e8490ec438ab66e08bb105577aca0ce06 2020-09-09 15:19:02 +02:00
build_session.go cli/command/image/build_session.go:133:45: getBuildSharedKey - result 1 (error) is always nil (unparam) 2019-10-31 19:22:18 +01:00
build_test.go vendor: buildkit 4d1f260e8490ec438ab66e08bb105577aca0ce06 2020-09-09 15:19:02 +02:00
client_test.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
cmd.go Move credential getting functions to the ConfigFile. 2017-06-27 13:46:47 +02:00
formatter_history.go formatter package heavy refactoring 2018-10-23 17:05:44 +02:00
formatter_history_test.go formatter: reduce minimum width for columns in table-view 2020-08-31 16:31:15 +02:00
history.go Replace 'numeric' with object in -q description 2020-03-02 10:28:52 +01:00
history_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
import.go LCOW: --platform on import (already in API) 2018-09-13 15:04:04 -07:00
import_test.go Add test-case for env with, and without = 2020-09-23 20:33:48 +02:00
inspect.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
inspect_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
list.go Remove 'images' alias from 'image ls' command 2020-06-15 17:48:43 +02:00
list_test.go Remove 'images' alias from 'image ls' command 2020-06-15 17:48:43 +02:00
load.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
load_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
prune.go prune: use filters.Args.Clone() 2018-12-10 16:48:59 +00:00
prune_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
pull.go Add option to pull images quietly 2018-12-19 13:48:41 +01:00
pull_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
push.go implement docker push -a/--all-tags 2020-01-28 16:21:06 +01:00
push_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
remove.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
remove_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
save.go Prevent overwriting irregular files (cp, save, export commands) 2019-02-07 09:17:35 +01:00
save_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
tag.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
tag_test.go Replace deprecated Cobra command.SetOutput() with command.SetOut() 2020-05-07 14:25:59 +02:00
trust.go implement docker push -a/--all-tags 2020-01-28 16:21:06 +01:00
trust_test.go test: make sure environment vars are reset after tests 2020-04-09 13:40:45 +02:00