Chen Min 2b62eb434b Fix Typos: continer,contianer -> container 8 年之前
..
testdata 7c36a1af03 Move engine-api client package 8 年之前
README.md f0d55cd081 Rename Remote API to Engine API 8 年之前
checkpoint_create.go 7c36a1af03 Move engine-api client package 8 年之前
checkpoint_create_test.go 9a072adff3 client: remove transport package 8 年之前
checkpoint_delete.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 年之前
checkpoint_delete_test.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 年之前
checkpoint_list.go 98ffe52fbc update incorrect comments of CheckpointList 8 年之前
checkpoint_list_test.go 8ddfd2f759 more descriptive error fo checkpoint ls for non existent containers 8 年之前
client.go 6ce6ae1cd1 client: Expose DaemonHost to client users 8 年之前
client_mock_test.go 9a072adff3 client: remove transport package 8 年之前
client_test.go eb36d60216 Return error on client redirect 8 年之前
client_unix.go 7c36a1af03 Move engine-api client package 8 年之前
client_windows.go 7c36a1af03 Move engine-api client package 8 年之前
config_create.go 102738101a Add configs support to client 8 年之前
config_create_test.go 102738101a Add configs support to client 8 年之前
config_inspect.go 102738101a Add configs support to client 8 年之前
config_inspect_test.go 102738101a Add configs support to client 8 年之前
config_list.go 102738101a Add configs support to client 8 年之前
config_list_test.go 102738101a Add configs support to client 8 年之前
config_remove.go 102738101a Add configs support to client 8 年之前
config_remove_test.go 102738101a Add configs support to client 8 年之前
config_update.go 4a98f9ef7f fix typos in function comments 8 年之前
config_update_test.go 102738101a Add configs support to client 8 年之前
container_attach.go fc8097f957 Add Logs to ContainerAttachOptions 8 年之前
container_commit.go 3a1279393f Use distribution reference 8 年之前
container_commit_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 年之前
container_copy.go 8a7ff5ff74 daemon/archive.go: Fix copy routines to preserve UID. 8 年之前
container_copy_test.go 40b8ff6243 Optimize the log info for client test 8 年之前
container_create.go 0ea7b143b0 Don't use AutoRemove on older daemons 8 年之前
container_create_test.go f8a4047796 why there are so many mistakes in our repo (up to /cmd) 8 年之前
container_diff.go b83d9bf6a9 Generate ContainerChanges from swagger spec. 8 年之前
container_diff_test.go b83d9bf6a9 Generate ContainerChanges from swagger spec. 8 年之前
container_exec.go e98e4a7111 always add but hide experimental cmds and flags 8 年之前
container_exec_test.go 01883c136d Add an IDResponse type 8 年之前
container_export.go 7c36a1af03 Move engine-api client package 8 年之前
container_export_test.go 9a072adff3 client: remove transport package 8 年之前
container_inspect.go 7c36a1af03 Move engine-api client package 8 年之前
container_inspect_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 年之前
container_kill.go 7c36a1af03 Move engine-api client package 8 年之前
container_kill_test.go 9a072adff3 client: remove transport package 8 年之前
container_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
container_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
container_logs.go 7c36a1af03 Move engine-api client package 8 年之前
container_logs_test.go 9a072adff3 client: remove transport package 8 年之前
container_pause.go 7c36a1af03 Move engine-api client package 8 年之前
container_pause_test.go 9a072adff3 client: remove transport package 8 年之前
container_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 年之前
container_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 年之前
container_remove.go 7c36a1af03 Move engine-api client package 8 年之前
container_remove_test.go 9a072adff3 client: remove transport package 8 年之前
container_rename.go 7c36a1af03 Move engine-api client package 8 年之前
container_rename_test.go 9a072adff3 client: remove transport package 8 年之前
container_resize.go 53774423ff Windows: OCI process struct convergence 8 年之前
container_resize_test.go 9a072adff3 client: remove transport package 8 年之前
container_restart.go 7c36a1af03 Move engine-api client package 8 年之前
container_restart_test.go 9a072adff3 client: remove transport package 8 年之前
container_start.go bd7d51292c Allow providing a custom storage directory for docker checkpoints 8 年之前
container_start_test.go 9a072adff3 client: remove transport package 8 年之前
container_stats.go d8dcbf3ec3 Tidy GetDockerOS() function 8 年之前
container_stats_test.go 7a86930c74 Merge pull request #26436 from stevvooe/remove-transport-package 8 年之前
container_stop.go 7c36a1af03 Move engine-api client package 8 年之前
container_stop_test.go 9a072adff3 client: remove transport package 8 年之前
container_top.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. 8 年之前
container_top_test.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. 8 年之前
container_unpause.go 7c36a1af03 Move engine-api client package 8 年之前
container_unpause_test.go 9a072adff3 client: remove transport package 8 年之前
container_update.go f196cf6a09 Generate container update response from swagger spec. 8 年之前
container_update_test.go f196cf6a09 Generate container update response from swagger spec. 8 年之前
container_wait.go 2b62eb434b Fix Typos: continer,contianer -> container 8 年之前
container_wait_test.go 4921171587 Update ContainerWait API 8 年之前
disk_usage.go f830d52dd0 Add DiskUsage method to SystemApiclient 8 年之前
disk_usage_test.go d70fde8ffe add disk usage test for client 8 年之前
distribution_inspect.go c1635c1ae3 Moving docker service digest pinning to client side 8 年之前
errors.go 102738101a Add configs support to client 8 年之前
events.go 47585996bf Fixes a race condition in client events monitoring 8 年之前
events_test.go d6bd79c18f Refactor to new events api 8 年之前
hijack.go d32ffb72b7 Refactor client/request 8 年之前
image_build.go 33e07f41ad builder: add an option for specifying build target 8 年之前
image_build_test.go b1996728aa Update docs and code to use application/x-tar in the build API 8 年之前
image_create.go 3a1279393f Use distribution reference 8 年之前
image_create_test.go 9a072adff3 client: remove transport package 8 年之前
image_history.go b462c93edb Generate ImageHistory from swagger spec. 8 年之前
image_history_test.go b462c93edb Generate ImageHistory from swagger spec. 8 年之前
image_import.go 3a1279393f Use distribution reference 8 年之前
image_import_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 年之前
image_inspect.go 7c36a1af03 Move engine-api client package 8 年之前
image_inspect_test.go 9a072adff3 client: remove transport package 8 年之前
image_list.go c6e31454ba Fixes ImageList to be retro-compatible with older API 8 年之前
image_list_test.go c6e31454ba Fixes ImageList to be retro-compatible with older API 8 年之前
image_load.go 7c36a1af03 Move engine-api client package 8 年之前
image_load_test.go 9a072adff3 client: remove transport package 8 年之前
image_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 年之前
image_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 年之前
image_pull.go 3a1279393f Use distribution reference 8 年之前
image_pull_test.go 3a1279393f Use distribution reference 8 年之前
image_push.go 3a1279393f Use distribution reference 8 年之前
image_push_test.go 3a1279393f Use distribution reference 8 年之前
image_remove.go 5988b84e4f Generate ImageDeleteResponse from swagger spec. 8 年之前
image_remove_test.go 5988b84e4f Generate ImageDeleteResponse from swagger spec. 8 年之前
image_save.go 7c36a1af03 Move engine-api client package 8 年之前
image_save_test.go 9a072adff3 client: remove transport package 8 年之前
image_search.go 7c36a1af03 Move engine-api client package 8 年之前
image_search_test.go c1ce63b17b api/types/container,client: gofmt 8 年之前
image_tag.go 4a0704cdbd client: Allow hex strings as source references for ImageTag 8 年之前
image_tag_test.go 4a0704cdbd client: Allow hex strings as source references for ImageTag 8 年之前
info.go 7c36a1af03 Move engine-api client package 8 年之前
info_test.go 514ca09426 api: types: keep info.SecurityOptions a string slice 8 年之前
interface.go 6ce6ae1cd1 client: Expose DaemonHost to client users 8 年之前
interface_experimental.go c410222e42 move plugins out of experimental 8 年之前
interface_stable.go 7781a1bf0f Make experimental a runtime flag 8 年之前
login.go 16233eb055 Fix the inconsistent function name for client 8 年之前
network_connect.go 7c36a1af03 Move engine-api client package 8 年之前
network_connect_test.go fd74940304 add test case check connect.EndpointConfig not nil 8 年之前
network_create.go 7c36a1af03 Move engine-api client package 8 年之前
network_create_test.go 9a072adff3 client: remove transport package 8 年之前
network_disconnect.go 7c36a1af03 Move engine-api client package 8 年之前
network_disconnect_test.go 9a072adff3 client: remove transport package 8 年之前
network_inspect.go 14f76a21db Enhance network inspect to show all tasks, local & non-local, in swarm mode 8 年之前
network_inspect_test.go 14f76a21db Enhance network inspect to show all tasks, local & non-local, in swarm mode 8 年之前
network_list.go 7c36a1af03 Move engine-api client package 8 年之前
network_list_test.go 9a072adff3 client: remove transport package 8 年之前
network_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` 8 年之前
network_prune_test.go 6052f2b396 Remove pkg/testutil/assert in favor of testify 8 年之前
network_remove.go 7c36a1af03 Move engine-api client package 8 年之前
network_remove_test.go 9a072adff3 client: remove transport package 8 年之前
node_inspect.go 7c36a1af03 Move engine-api client package 8 年之前
node_inspect_test.go 7c3657065c change minor mistake of spelling 8 年之前
node_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
node_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
node_remove.go 7c36a1af03 Move engine-api client package 8 年之前
node_remove_test.go 9a072adff3 client: remove transport package 8 年之前
node_update.go 7c36a1af03 Move engine-api client package 8 年之前
node_update_test.go 9a072adff3 client: remove transport package 8 年之前
parse_logs.go 68f21418ac Change log details encoding format and support details on service logs 8 年之前
parse_logs_test.go 68f21418ac Change log details encoding format and support details on service logs 8 年之前
ping.go 7199522ea2 Hide command options that are related to Windows 8 年之前
plugin_create.go b1996728aa Update docs and code to use application/x-tar in the build API 8 年之前
plugin_disable.go 8cb2229cd1 Enforce zero plugin refcount during disable. 8 年之前
plugin_disable_test.go 8cb2229cd1 Enforce zero plugin refcount during disable. 8 年之前
plugin_enable.go 83ca993c15 Add HTTP client timeout. 8 年之前
plugin_enable_test.go 83ca993c15 Add HTTP client timeout. 8 年之前
plugin_inspect.go 1c96879f1e Merge pull request #28963 from vieux/refactor_plugin_install 8 年之前
plugin_inspect_test.go 7781a1bf0f Make experimental a runtime flag 8 年之前
plugin_install.go 1b41b7a4f4 Net dial to the plugin socket during enable. 8 年之前
plugin_list.go a66e0dc349 Add `--filter enabled=true` for `docker plugin ls` 8 年之前
plugin_list_test.go 99d91ada97 Add `capability` filter to `docker plugin ls` 8 年之前
plugin_push.go 3d86b0c79b Implement content addressability for plugins 8 年之前
plugin_push_test.go 3d86b0c79b Implement content addressability for plugins 8 年之前
plugin_remove.go 7781a1bf0f Make experimental a runtime flag 8 年之前
plugin_remove_test.go 773ae28dae expected new_container_id while testing ContainerCommit 8 年之前
plugin_set.go 7781a1bf0f Make experimental a runtime flag 8 年之前
plugin_set_test.go 7781a1bf0f Make experimental a runtime flag 8 年之前
plugin_upgrade.go 3a1279393f Use distribution reference 8 年之前
request.go 16233eb055 Fix the inconsistent function name for client 8 年之前
request_test.go 9a072adff3 client: remove transport package 8 年之前
secret_create.go 31d9ce6f5c remove unused headers in secret_create.go 8 年之前
secret_create_test.go 86d7682843 update secret create url for consistency 8 年之前
secret_inspect.go 3716ec25b4 secrets: secret management for swarm 8 年之前
secret_inspect_test.go 7c3657065c change minor mistake of spelling 8 年之前
secret_list.go b2e4c7f3b5 review updates 8 年之前
secret_list_test.go b2e4c7f3b5 review updates 8 年之前
secret_remove.go 3716ec25b4 secrets: secret management for swarm 8 年之前
secret_remove_test.go 3716ec25b4 secrets: secret management for swarm 8 年之前
secret_update.go 4a98f9ef7f fix typos in function comments 8 年之前
secret_update_test.go 77b8465d7e Add SecretUpdate method to client 8 年之前
service_create.go 5efcec7717 Ensure service images get default tag and print familiar strings 8 年之前
service_create_test.go 75c7536d2e Adding unit tests for pin by digest (client) 8 年之前
service_inspect.go 1d274e9acf Change "service inspect" to show defaults in place of empty fields 8 年之前
service_inspect_test.go 1d274e9acf Change "service inspect" to show defaults in place of empty fields 8 年之前
service_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
service_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
service_logs.go 819d0159bb api: Service Logs support 8 年之前
service_logs_test.go 819d0159bb api: Service Logs support 8 年之前
service_remove.go 7c36a1af03 Move engine-api client package 8 年之前
service_remove_test.go 9a072adff3 client: remove transport package 8 年之前
service_update.go 5efcec7717 Ensure service images get default tag and print familiar strings 8 年之前
service_update_test.go 948e60691e Return warnings from service create and service update when digest pinning fails 8 年之前
swarm_get_unlock_key.go 0f9fc54df9 Revise swarm init/update flags, add unlocking capability 8 年之前
swarm_get_unlock_key_test.go a86023eaa9 add swarm get unlock key test for client package 8 年之前
swarm_init.go 113cae5ba2 Change tls to TLS 8 年之前
swarm_init_test.go 9a072adff3 client: remove transport package 8 年之前
swarm_inspect.go 113cae5ba2 Change tls to TLS 8 年之前
swarm_inspect_test.go 9a072adff3 client: remove transport package 8 年之前
swarm_join.go 113cae5ba2 Change tls to TLS 8 年之前
swarm_join_test.go 9a072adff3 client: remove transport package 8 年之前
swarm_leave.go 113cae5ba2 Change tls to TLS 8 年之前
swarm_leave_test.go 9a072adff3 client: remove transport package 8 年之前
swarm_unlock.go f8a4047796 why there are so many mistakes in our repo (up to /cmd) 8 年之前
swarm_update.go 113cae5ba2 Change tls to TLS 8 年之前
swarm_update_test.go 9a072adff3 client: remove transport package 8 年之前
task_inspect.go 7c36a1af03 Move engine-api client package 8 年之前
task_inspect_test.go 9a072adff3 client: remove transport package 8 年之前
task_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
task_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency 8 年之前
task_logs.go d330dc3223 Add support for task and arbitrary combo logs 8 年之前
transport.go 8f9a48ab5a Merge pull request #29565 from yuexiao-wang/fix-typo-tls 8 年之前
utils.go c1635c1ae3 Moving docker service digest pinning to client side 8 年之前
version.go 7c36a1af03 Move engine-api client package 8 年之前
volume_create.go 29df3bdb11 Use a config to generate swagger api types 8 年之前
volume_create_test.go 29df3bdb11 Use a config to generate swagger api types 8 年之前
volume_inspect.go 7c36a1af03 Move engine-api client package 8 年之前
volume_inspect_test.go 9a072adff3 client: remove transport package 8 年之前
volume_list.go 29df3bdb11 Use a config to generate swagger api types 8 年之前
volume_list_test.go 29df3bdb11 Use a config to generate swagger api types 8 年之前
volume_prune.go df64bc3ed0 remove redundant colon introduced by mistake 8 年之前
volume_remove.go e98e4a7111 always add but hide experimental cmds and flags 8 年之前
volume_remove_test.go 9a072adff3 client: remove transport package 8 年之前

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.