act/vendor/github.com/docker/docker/client
Casey Lee 320e9b6057
fail on error (#20)
ci-via-github-actions
2019-01-23 11:51:22 -08:00
..
build_cancel.go fail on error (#20) 2019-01-23 11:51:22 -08:00
build_prune.go fail on error (#20) 2019-01-23 11:51:22 -08:00
checkpoint_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
checkpoint_delete.go fail on error (#20) 2019-01-23 11:51:22 -08:00
checkpoint_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
client.go fail on error (#20) 2019-01-23 11:51:22 -08:00
client_unix.go fail on error (#20) 2019-01-23 11:51:22 -08:00
client_windows.go fail on error (#20) 2019-01-23 11:51:22 -08:00
config_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
config_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
config_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
config_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
config_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_attach.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_commit.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_copy.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_diff.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_exec.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_export.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_kill.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_logs.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_pause.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_prune.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_rename.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_resize.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_restart.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_start.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_stats.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_stop.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_top.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_unpause.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
container_wait.go fail on error (#20) 2019-01-23 11:51:22 -08:00
disk_usage.go fail on error (#20) 2019-01-23 11:51:22 -08:00
distribution_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
errors.go fail on error (#20) 2019-01-23 11:51:22 -08:00
events.go fail on error (#20) 2019-01-23 11:51:22 -08:00
hijack.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_build.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_history.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_import.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_load.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_prune.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_pull.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_push.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_save.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_search.go fail on error (#20) 2019-01-23 11:51:22 -08:00
image_tag.go fail on error (#20) 2019-01-23 11:51:22 -08:00
info.go fail on error (#20) 2019-01-23 11:51:22 -08:00
interface.go fail on error (#20) 2019-01-23 11:51:22 -08:00
interface_experimental.go fail on error (#20) 2019-01-23 11:51:22 -08:00
interface_stable.go fail on error (#20) 2019-01-23 11:51:22 -08:00
login.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_connect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_disconnect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_prune.go fail on error (#20) 2019-01-23 11:51:22 -08:00
network_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
node_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
node_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
node_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
node_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
ping.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_disable.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_enable.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_install.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_push.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_set.go fail on error (#20) 2019-01-23 11:51:22 -08:00
plugin_upgrade.go fail on error (#20) 2019-01-23 11:51:22 -08:00
README.md fail on error (#20) 2019-01-23 11:51:22 -08:00
request.go fail on error (#20) 2019-01-23 11:51:22 -08:00
secret_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
secret_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
secret_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
secret_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
secret_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_logs.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_remove.go fail on error (#20) 2019-01-23 11:51:22 -08:00
service_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
session.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_get_unlock_key.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_init.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_join.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_leave.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_unlock.go fail on error (#20) 2019-01-23 11:51:22 -08:00
swarm_update.go fail on error (#20) 2019-01-23 11:51:22 -08:00
task_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
task_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
task_logs.go fail on error (#20) 2019-01-23 11:51:22 -08:00
transport.go fail on error (#20) 2019-01-23 11:51:22 -08:00
utils.go fail on error (#20) 2019-01-23 11:51:22 -08:00
version.go fail on error (#20) 2019-01-23 11:51:22 -08:00
volume_create.go fail on error (#20) 2019-01-23 11:51:22 -08:00
volume_inspect.go fail on error (#20) 2019-01-23 11:51:22 -08:00
volume_list.go fail on error (#20) 2019-01-23 11:51:22 -08:00
volume_prune.go fail on error (#20) 2019-01-23 11:51:22 -08:00
volume_remove.go fail on error (#20) 2019-01-23 11:51:22 -08: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.