install/uninstall: allow aliasing buildx to docker builder
Currently the user can type `docker buildx` to use this tool. This patch allows the user to install buildx as a `docker builder` alias. As an additional benefit, this allows the regular `docker build` to hook into `buildx build`. Note that the install and uninstall commands are currently hidden. Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
20
vendor/github.com/docker/cli/opts/network.go
generated
vendored
20
vendor/github.com/docker/cli/opts/network.go
generated
vendored
@@ -15,9 +15,13 @@ const (
|
||||
|
||||
// NetworkAttachmentOpts represents the network options for endpoint creation
|
||||
type NetworkAttachmentOpts struct {
|
||||
Target string
|
||||
Aliases []string
|
||||
DriverOpts map[string]string
|
||||
Target string
|
||||
Aliases []string
|
||||
DriverOpts map[string]string
|
||||
Links []string // TODO add support for links in the csv notation of `--network`
|
||||
IPv4Address string // TODO add support for IPv4-address in the csv notation of `--network`
|
||||
IPv6Address string // TODO add support for IPv6-address in the csv notation of `--network`
|
||||
LinkLocalIPs []string // TODO add support for LinkLocalIPs in the csv notation of `--network` ?
|
||||
}
|
||||
|
||||
// NetworkOpt represents a network config in swarm mode.
|
||||
@@ -95,6 +99,16 @@ func (n *NetworkOpt) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// NetworkMode return the network mode for the network option
|
||||
func (n *NetworkOpt) NetworkMode() string {
|
||||
networkIDOrName := "default"
|
||||
netOptVal := n.Value()
|
||||
if len(netOptVal) > 0 {
|
||||
networkIDOrName = netOptVal[0].Target
|
||||
}
|
||||
return networkIDOrName
|
||||
}
|
||||
|
||||
func parseDriverOpt(driverOpt string) (string, string, error) {
|
||||
parts := strings.SplitN(driverOpt, "=", 2)
|
||||
if len(parts) != 2 {
|
||||
|
||||
Reference in New Issue
Block a user