DockerCLI/cli
Albin Kerouanton f1048e1a3a
Create default EndpointSettings if no --network provided
Following flags are silently ignored when they're passed with no
`--network` specified (ie. when the default network is used):

- `--network-alias`
- `--ip`
- `--ip6`
- `--link-local-ip`

This is not really an issue right now since the first 3 parameters are
not allowed on the default bridge network. However, with
[moby/moby#45905][1], the container-wide MacAddress parameter will be
deprecated and dismissed. Because of that, with [docker/cli#4419][2],
it's currently not possible to use the `--mac-address` flag with no
default network specified.

Morever, `docker network connect --link-local-ip ...` works properly, so
it should also work on `docker container create`. This also lay the
ground for making the default bridge network just a "normal" network.

Since the 3 parameters in the list above aren't ignored anymore, if
users provide them, moby's ContainerStart endpoint will complain about
those. To provide better UX, [moby/moby#46183][3] make sure these
invalid parameters lead to a proper error message on `docker container
create` / `docker run`.

[1]: https://github.com/moby/moby/pull/45905
[2]: https://github.com/docker/cli/pull/4419
[3]: https://github.com/moby/moby/pull/46183

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-10 17:19:43 +02:00
..
command Create default EndpointSettings if no --network provided 2023-09-10 17:19:43 +02:00
compose cli/container: Don't ignore error when parsing volume spec 2023-07-12 09:45:55 +02:00
config configfile: Initialize nil AuthConfigs 2023-07-19 15:36:10 +02:00
connhelper commandconn: return original error while closing 2023-06-30 19:15:18 +02:00
context cli/context/docker: Endpoint.ClientOpts, withHTTPClient: inline variables 2023-07-15 14:41:25 +02:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags cli: move "config" flag to cli/flags/ClientOptions.InstallFlags() 2023-06-28 16:04:09 +02:00
hints login: Add message about using PATs 2023-08-03 10:35:04 +02:00
manifest migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
registry/client migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
streams cli/streams: minor refactoring and docs touch-ups 2023-04-03 11:27:26 +02:00
trust migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
version Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
winresources Use goversioninfo to create Windows Version Info 2021-10-11 16:54:22 +02:00
cobra.go cli: SetupRootCommand: remove redundant flags return 2023-06-28 16:26:50 +02:00
cobra_test.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go format (GoDoc) comments with Go 1.19 to prepare for go updates 2022-07-19 19:10:16 +02:00
required_test.go cli: remove deprecated io/ioutil 2022-02-25 15:42:19 +01:00