Files
linuxkit/vendor/github.com/docker/docker/client
Ian Campbell 6c6499bdd5 Update docker/docker vendor to 6978a6e25a2e6063f280ec842bd0f3eae99426e1
This includes https://github.com/moby/moby/pull/34040 which fixes Windows build
issues.

Note that this pulls in more than 500 (non merge) commits as well as the fix we
are interested in. A couple of new deps are pulled in, versions taken from
vendor/github.com/docker/docker/vendor.conf.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-11 10:47:39 +01:00
..
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-05-15 17:32:10 +01:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -07:00
2017-04-27 13:31:16 -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.NewEnvClient()
	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.