Daniel Nephin e5cce50c7e Add code coverage report and codecov config 7 years ago
..
testdata 7c36a1af03 Move engine-api client package 8 years ago
README.md f0d55cd081 Rename Remote API to Engine API 8 years ago
build_prune.go 5c3d2d552b Implement incremental file sync using client session 8 years ago
checkpoint_create.go 7c36a1af03 Move engine-api client package 8 years ago
checkpoint_create_test.go 9a072adff3 client: remove transport package 8 years ago
checkpoint_delete.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 years ago
checkpoint_delete_test.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 years ago
checkpoint_list.go 81bb9978ab Cleanup client not found errors. 7 years ago
checkpoint_list_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
client.go 4b6ec10b07 Fix version comparison when negotiating the the API version 7 years ago
client_mock_test.go 62c1f0ef41 Add deadcode linter 8 years ago
client_test.go e5cce50c7e Add code coverage report and codecov config 7 years ago
client_unix.go 4785f1a7ab Remove solaris build tag and `contrib/mkimage/solaris 7 years ago
client_windows.go 7c36a1af03 Move engine-api client package 8 years ago
config_create.go 1401342f46 Add API version checks to client 8 years ago
config_create_test.go 1401342f46 Add API version checks to client 8 years ago
config_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
config_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
config_list.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
config_list_test.go 1401342f46 Add API version checks to client 8 years ago
config_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
config_remove_test.go 1401342f46 Add API version checks to client 8 years ago
config_update.go 1401342f46 Add API version checks to client 8 years ago
config_update_test.go 1401342f46 Add API version checks to client 8 years ago
container_attach.go 48829ddf88 Add stream format details for attach/logs endpoint 8 years ago
container_commit.go f7f101d57e Add gosimple linter 7 years ago
container_commit_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 years ago
container_copy.go e330e7a5ce Update doc for CopyFromContainer 7 years ago
container_copy_test.go 40b8ff6243 Optimize the log info for client test 8 years ago
container_create.go 81bb9978ab Cleanup client not found errors. 7 years ago
container_create_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
container_diff.go b83d9bf6a9 Generate ContainerChanges from swagger spec. 8 years ago
container_diff_test.go b83d9bf6a9 Generate ContainerChanges from swagger spec. 8 years ago
container_exec.go 5fee8bddfe Use correct type for ContainerExecAttach 7 years ago
container_exec_test.go 01883c136d Add an IDResponse type 8 years ago
container_export.go 7c36a1af03 Move engine-api client package 8 years ago
container_export_test.go 9a072adff3 client: remove transport package 8 years ago
container_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
container_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
container_kill.go 7c36a1af03 Move engine-api client package 8 years ago
container_kill_test.go 9a072adff3 client: remove transport package 8 years ago
container_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 years ago
container_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 years ago
container_logs.go 2d6fb87ca4 Wrap response error for container logs method. 7 years ago
container_logs_test.go 2d6fb87ca4 Wrap response error for container logs method. 7 years ago
container_pause.go 7c36a1af03 Move engine-api client package 8 years ago
container_pause_test.go 9a072adff3 client: remove transport package 8 years ago
container_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 years ago
container_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 years ago
container_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
container_remove_test.go 81bb9978ab Cleanup client not found errors. 7 years ago
container_rename.go 7c36a1af03 Move engine-api client package 8 years ago
container_rename_test.go 9a072adff3 client: remove transport package 8 years ago
container_resize.go 53774423ff Windows: OCI process struct convergence 8 years ago
container_resize_test.go 9a072adff3 client: remove transport package 8 years ago
container_restart.go 7c36a1af03 Move engine-api client package 8 years ago
container_restart_test.go 9a072adff3 client: remove transport package 8 years ago
container_start.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 years ago
container_start_test.go 9a072adff3 client: remove transport package 8 years ago
container_stats.go d8dcbf3ec3 Tidy GetDockerOS() function 8 years ago
container_stats_test.go 7a86930c74 Merge pull request #26436 from stevvooe/remove-transport-package 8 years ago
container_stop.go 7c36a1af03 Move engine-api client package 8 years ago
container_stop_test.go 9a072adff3 client: remove transport package 8 years ago
container_top.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. 8 years ago
container_top_test.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. 8 years ago
container_unpause.go 7c36a1af03 Move engine-api client package 8 years ago
container_unpause_test.go 9a072adff3 client: remove transport package 8 years ago
container_update.go f196cf6a09 Generate container update response from swagger spec. 8 years ago
container_update_test.go f196cf6a09 Generate container update response from swagger spec. 8 years ago
container_wait.go 39bcaee47b Spelling fixes 8 years ago
container_wait_test.go 4921171587 Update ContainerWait API 8 years ago
disk_usage.go f830d52dd0 Add DiskUsage method to SystemApiclient 8 years ago
disk_usage_test.go d70fde8ffe add disk usage test for client 8 years ago
distribution_inspect.go 1401342f46 Add API version checks to client 8 years ago
distribution_inspect_test.go 1401342f46 Add API version checks to client 8 years ago
errors.go 7553fc4bcd Remove deprecated IsErr...NotFound() functions 7 years ago
events.go 47585996bf Fixes a race condition in client events monitoring 8 years ago
events_test.go d6bd79c18f Refactor to new events api 8 years ago
hijack.go f7f101d57e Add gosimple linter 7 years ago
image_build.go d98ecf2d6c LCOW: API change JSON header to string POST parameter 7 years ago
image_build_test.go b1996728aa Update docs and code to use application/x-tar in the build API 8 years ago
image_create.go d98ecf2d6c LCOW: API change JSON header to string POST parameter 7 years ago
image_create_test.go 9a072adff3 client: remove transport package 8 years ago
image_history.go b462c93edb Generate ImageHistory from swagger spec. 8 years ago
image_history_test.go b462c93edb Generate ImageHistory from swagger spec. 8 years ago
image_import.go d98ecf2d6c LCOW: API change JSON header to string POST parameter 7 years ago
image_import_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 years ago
image_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
image_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
image_list.go c6e31454ba Fixes ImageList to be retro-compatible with older API 8 years ago
image_list_test.go c6e31454ba Fixes ImageList to be retro-compatible with older API 8 years ago
image_load.go 7c36a1af03 Move engine-api client package 8 years ago
image_load_test.go 9a072adff3 client: remove transport package 8 years ago
image_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 years ago
image_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 years ago
image_pull.go d98ecf2d6c LCOW: API change JSON header to string POST parameter 7 years ago
image_pull_test.go 3a1279393f Use distribution reference 8 years ago
image_push.go 3a1279393f Use distribution reference 8 years ago
image_push_test.go 3a1279393f Use distribution reference 8 years ago
image_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
image_remove_test.go 81bb9978ab Cleanup client not found errors. 7 years ago
image_save.go 7c36a1af03 Move engine-api client package 8 years ago
image_save_test.go 9a072adff3 client: remove transport package 8 years ago
image_search.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
image_search_test.go 372670b507 Add goimports to linters. 8 years ago
image_tag.go 4a0704cdbd client: Allow hex strings as source references for ImageTag 8 years ago
image_tag_test.go 4a0704cdbd client: Allow hex strings as source references for ImageTag 8 years ago
info.go 7c36a1af03 Move engine-api client package 8 years ago
info_test.go 514ca09426 api: types: keep info.SecurityOptions a string slice 8 years ago
interface.go 5fee8bddfe Use correct type for ContainerExecAttach 7 years ago
interface_experimental.go c410222e42 move plugins out of experimental 8 years ago
interface_stable.go 7781a1bf0f Make experimental a runtime flag 8 years ago
login.go 16233eb055 Fix the inconsistent function name for client 8 years ago
network_connect.go 7c36a1af03 Move engine-api client package 8 years ago
network_connect_test.go fd74940304 add test case check connect.EndpointConfig not nil 8 years ago
network_create.go 7c36a1af03 Move engine-api client package 8 years ago
network_create_test.go 9a072adff3 client: remove transport package 8 years ago
network_disconnect.go 7c36a1af03 Move engine-api client package 8 years ago
network_disconnect_test.go 9a072adff3 client: remove transport package 8 years ago
network_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
network_inspect_test.go 81bb9978ab Cleanup client not found errors. 7 years ago
network_list.go 7c36a1af03 Move engine-api client package 8 years ago
network_list_test.go 9a072adff3 client: remove transport package 8 years ago
network_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 years ago
network_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 years ago
network_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
network_remove_test.go 9a072adff3 client: remove transport package 8 years ago
node_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
node_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
node_list.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
node_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 years ago
node_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
node_remove_test.go 9a072adff3 client: remove transport package 8 years ago
node_update.go 7c36a1af03 Move engine-api client package 8 years ago
node_update_test.go 9a072adff3 client: remove transport package 8 years ago
ping.go 81bb9978ab Cleanup client not found errors. 7 years ago
ping_test.go 27ef09a46f Set ping version even on error 8 years ago
plugin_create.go b1996728aa Update docs and code to use application/x-tar in the build API 8 years ago
plugin_disable.go 8cb2229cd1 Enforce zero plugin refcount during disable. 8 years ago
plugin_disable_test.go 8cb2229cd1 Enforce zero plugin refcount during disable. 8 years ago
plugin_enable.go 83ca993c15 Add HTTP client timeout. 8 years ago
plugin_enable_test.go 83ca993c15 Add HTTP client timeout. 8 years ago
plugin_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
plugin_inspect_test.go 7781a1bf0f Make experimental a runtime flag 8 years ago
plugin_install.go 1b41b7a4f4 Net dial to the plugin socket during enable. 8 years ago
plugin_list.go e7e11bdd44 Handle plugin list not implemented 7 years ago
plugin_list_test.go 99d91ada97 Add `capability` filter to `docker plugin ls` 8 years ago
plugin_push.go 3d86b0c79b Implement content addressability for plugins 8 years ago
plugin_push_test.go 3d86b0c79b Implement content addressability for plugins 8 years ago
plugin_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
plugin_remove_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 years ago
plugin_set.go 7781a1bf0f Make experimental a runtime flag 8 years ago
plugin_set_test.go 7781a1bf0f Make experimental a runtime flag 8 years ago
plugin_upgrade.go 1401342f46 Add API version checks to client 8 years ago
request.go 81bb9978ab Cleanup client not found errors. 7 years ago
request_test.go 9a072adff3 client: remove transport package 8 years ago
secret_create.go 1401342f46 Add API version checks to client 8 years ago
secret_create_test.go 1401342f46 Add API version checks to client 8 years ago
secret_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
secret_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
secret_list.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
secret_list_test.go 1401342f46 Add API version checks to client 8 years ago
secret_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
secret_remove_test.go 1401342f46 Add API version checks to client 8 years ago
secret_update.go 1401342f46 Add API version checks to client 8 years ago
secret_update_test.go 1401342f46 Add API version checks to client 8 years ago
service_create.go 09652bf878 Add ineffassign linter 7 years ago
service_create_test.go 72c3bcf2a5 Make plugin emit strongly typed, consumable events 8 years ago
service_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
service_inspect_test.go 919726b5db Replace uses of deprecated IsErr...Notfound() 7 years ago
service_list.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
service_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 years ago
service_logs.go 819d0159bb api: Service Logs support 8 years ago
service_logs_test.go 819d0159bb api: Service Logs support 8 years ago
service_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
service_remove_test.go 81bb9978ab Cleanup client not found errors. 7 years ago
service_update.go 72c3bcf2a5 Make plugin emit strongly typed, consumable events 8 years ago
service_update_test.go 948e60691e Return warnings from service create and service update when digest pinning fails 8 years ago
session.go ec7b6238c3 Add long-running client session endpoint 8 years ago
swarm_get_unlock_key.go 0f9fc54df9 Revise swarm init/update flags, add unlocking capability 8 years ago
swarm_get_unlock_key_test.go e62b2d410c Move ErrorContains to an internal package. 8 years ago
swarm_init.go 113cae5ba2 Change tls to TLS 8 years ago
swarm_init_test.go 9a072adff3 client: remove transport package 8 years ago
swarm_inspect.go 113cae5ba2 Change tls to TLS 8 years ago
swarm_inspect_test.go 9a072adff3 client: remove transport package 8 years ago
swarm_join.go 113cae5ba2 Change tls to TLS 8 years ago
swarm_join_test.go 9a072adff3 client: remove transport package 8 years ago
swarm_leave.go 113cae5ba2 Change tls to TLS 8 years ago
swarm_leave_test.go 9a072adff3 client: remove transport package 8 years ago
swarm_unlock.go f8a4047796 why there are so many mistakes in our repo (up to /cmd) 8 years ago
swarm_unlock_test.go 8ff023fe5a add swarm unlock test in client 8 years ago
swarm_update.go 113cae5ba2 Change tls to TLS 8 years ago
swarm_update_test.go 9a072adff3 client: remove transport package 8 years ago
task_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
task_inspect_test.go 9a072adff3 client: remove transport package 8 years ago
task_list.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
task_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 years ago
task_logs.go d330dc3223 Add support for task and arbitrary combo logs 8 years ago
tlsconfig_clone.go 6916c215b0 Move tlsconfig to client package. 7 years ago
tlsconfig_clone_go17.go 6916c215b0 Move tlsconfig to client package. 7 years ago
transport.go 62c1f0ef41 Add deadcode linter 8 years ago
utils.go a4efe66cf2 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 7 years ago
version.go 7c36a1af03 Move engine-api client package 8 years ago
volume_create.go 29df3bdb11 Use a config to generate swagger api types 8 years ago
volume_create_test.go 29df3bdb11 Use a config to generate swagger api types 8 years ago
volume_inspect.go 81bb9978ab Cleanup client not found errors. 7 years ago
volume_inspect_test.go 5ac298fd0e Fix volume inspect with empty ID 7 years ago
volume_list.go 29df3bdb11 Use a config to generate swagger api types 8 years ago
volume_list_test.go 29df3bdb11 Use a config to generate swagger api types 8 years ago
volume_prune.go df64bc3ed0 remove redundant colon introduced by mistake 8 years ago
volume_remove.go 81bb9978ab Cleanup client not found errors. 7 years ago
volume_remove_test.go 9a072adff3 client: remove transport package 8 years ago

README.md

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.