Files
buildx/vendor/github.com/docker/docker/client
CrazyMax b0deb8bdd7 vendor: update docker/cli to f1615fa
also needs to update docker/docker to a60b458 (22.06 branch) otherwise
build breaks since docker/cli#3512 with:

    # github.com/docker/cli/cli/flags
    vendor/github.com/docker/cli/cli/flags/common.go:40:37: undefined: client.EnvOverrideCertPath
    vendor/github.com/docker/cli/cli/flags/common.go:41:37: undefined: client.EnvTLSVerify
    vendor/github.com/docker/cli/cli/flags/common.go:89:76: undefined: client.EnvOverrideHost

needs also to update github.com/spf13/cobra to v1.5.0 otherwise
build breaks with:

    # github.com/docker/cli/cli-plugins/plugin
    vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go:130:4: unknown field 'HiddenDefaultCmd' in struct literal of type cobra.CompletionOptions

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-22 10:53:37 +02:00
..
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2022-07-22 10:53:37 +02:00
2019-04-10 18:58:19 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2021-09-21 07:49:45 +02:00
2022-07-22 10:53:37 +02:00
2022-07-22 10:53:37 +02:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-04-10 18:58:19 -07:00
2022-07-22 10:53:37 +02:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-04-10 18:58:19 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-03-22 16:27:37 -07:00
2019-04-10 18:58:19 -07:00
2019-04-10 18:58:19 -07:00

Go client for the Docker Engine API

The docker command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc.

For example, to list running containers (the equivalent of docker ps):

package main

import (
	"context"
	"fmt"

	"github.com/docker/docker/api/types"
	"github.com/docker/docker/client"
)

func main() {
	cli, err := client.NewClientWithOpts(client.FromEnv)
	if err != nil {
		panic(err)
	}

	containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{})
	if err != nil {
		panic(err)
	}

	for _, container := range containers {
		fmt.Printf("%s %s\n", container.ID[:10], container.Image)
	}
}

Full documentation is available on GoDoc.