DockerCLI/cli/command/image
Sebastiaan van Stijn 25d53feb65
Annotate flags that are not supported by Buildkit
Before this patch:

```

Usage:	docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
      --add-host list           Add a custom host-to-IP mapping (host:ip)
      --build-arg list          Set build-time variables
      --cache-from strings      Images to consider as cache sources
      --cgroup-parent string    Optional parent cgroup for the container
      --cpu-period int          Limit the CPU CFS (Completely Fair Scheduler) period
      --cpu-quota int           Limit the CPU CFS (Completely Fair Scheduler) quota
  -c, --cpu-shares int          CPU shares (relative weight)
      --cpuset-cpus string      CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems string      MEMs in which to allow execution (0-3, 0,1)
      --disable-content-trust   Skip image verification (default true)
  -f, --file string             Name of the Dockerfile (Default is 'PATH/Dockerfile')
      --force-rm                Always remove intermediate containers
      --iidfile string          Write the image ID to the file
      --isolation string        Container isolation technology
      --label list              Set metadata for an image
  -m, --memory bytes            Memory limit
      --memory-swap bytes       Swap limit equal to memory plus swap: '-1' to enable unlimited swap
      --network string          Set the networking mode for the RUN instructions during build (default "default")
      --no-cache                Do not use cache when building the image
  -o, --output stringArray      Output destination (format: type=local,dest=path)
      --platform string         Set platform if server is multi-platform capable
      --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
      --pull                    Always attempt to pull a newer version of the image
  -q, --quiet                   Suppress the build output and print image ID on success
      --rm                      Remove intermediate containers after a successful build (default true)
      --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
      --security-opt strings    Security options
      --shm-size bytes          Size of /dev/shm
      --squash                  Squash newly built layers into a single new layer
      --ssh stringArray         SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
  -t, --tag list                Name and optionally a tag in the 'name:tag' format
      --target string           Set the target build stage to build.
      --ulimit ulimit           Ulimit options (default [])
```

With this patch applied:

```
DOCKER_BUILDKIT=1 docker build --help

Usage:	docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
      --add-host list           Add a custom host-to-IP mapping (host:ip)
      --build-arg list          Set build-time variables
      --cache-from strings      Images to consider as cache sources
      --disable-content-trust   Skip image verification (default true)
  -f, --file string             Name of the Dockerfile (Default is 'PATH/Dockerfile')
      --iidfile string          Write the image ID to the file
      --isolation string        Container isolation technology
      --label list              Set metadata for an image
      --network string          Set the networking mode for the RUN instructions during build (default "default")
      --no-cache                Do not use cache when building the image
  -o, --output stringArray      Output destination (format: type=local,dest=path)
      --platform string         Set platform if server is multi-platform capable
      --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
      --pull                    Always attempt to pull a newer version of the image
  -q, --quiet                   Suppress the build output and print image ID on success
      --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
      --squash                  Squash newly built layers into a single new layer
      --ssh stringArray         SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
  -t, --tag list                Name and optionally a tag in the 'name:tag' format
      --target string           Set the target build stage to build.
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7eecbb96af)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-27 15:57:30 +01:00
..
build fix formatting issue of encoded url 2020-01-17 13:48:54 +01:00
testdata fix(pull_test): for quiet option 2020-01-17 13:40:54 +01:00
build.go Annotate flags that are not supported by Buildkit 2020-01-27 15:57:30 +01:00
build_buildkit.go cli/command/image/build_buildkit.go:450:56: parseSSH - result 1 (error) is always nil (unparam) 2020-01-06 13:16:36 +01:00
build_session.go cli/command/image/build_session.go:133:45: getBuildSharedKey - result 1 (error) is always nil (unparam) 2020-01-06 13:16:36 +01:00
build_test.go Extract streams helpers from command package to their own package to remove a cyclic dependency from command to internal/containerizedengine 2019-01-28 14:36:00 +01: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 package heavy refactoring 2018-10-23 17:05:44 +02:00
history.go formatter package heavy refactoring 2018-10-23 17:05:44 +02:00
history_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
import.go LCOW: --platform on import (already in API) 2018-09-13 15:04:04 -07:00
import_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
inspect.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
inspect_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
list.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
list_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
load.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
load_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
prune.go prune: use filters.Args.Clone() 2018-12-10 16:48:59 +00:00
prune_test.go Fix panic when pruning images with label-filter 2018-12-07 17:56:31 +01:00
pull.go Add option to pull images quietly 2018-12-19 13:48:41 +01:00
pull_test.go fix(pull_test): for quiet option 2020-01-17 13:40:54 +01:00
push.go Export Push and Save 2018-06-14 15:48:21 +02:00
push_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
remove.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
remove_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
save.go Prevent overwriting irregular files (cp, save, export commands) 2019-02-07 09:17:35 +01:00
save_test.go Prevent overwriting irregular files (cp, save, export commands) 2019-02-07 09:17:35 +01:00
tag.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
tag_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
trust.go Extract streams helpers from command package to their own package to remove a cyclic dependency from command to internal/containerizedengine 2019-01-28 14:36:00 +01:00
trust_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00