allencloud 5c0ea56d56 remove redundant code and better error msg il y a 8 ans
..
testdata 7c36a1af03 Move engine-api client package il y a 8 ans
README.md f0d55cd081 Rename Remote API to Engine API il y a 8 ans
checkpoint_create.go 7c36a1af03 Move engine-api client package il y a 8 ans
checkpoint_create_test.go 9a072adff3 client: remove transport package il y a 8 ans
checkpoint_delete.go bd7d51292c Allow providing a custom storage directory for docker checkpoints il y a 8 ans
checkpoint_delete_test.go bd7d51292c Allow providing a custom storage directory for docker checkpoints il y a 8 ans
checkpoint_list.go 98ffe52fbc update incorrect comments of CheckpointList il y a 8 ans
checkpoint_list_test.go 8ddfd2f759 more descriptive error fo checkpoint ls for non existent containers il y a 8 ans
client.go 113cae5ba2 Change tls to TLS il y a 8 ans
client_mock_test.go 9a072adff3 client: remove transport package il y a 8 ans
client_test.go 113cae5ba2 Change tls to TLS il y a 8 ans
client_unix.go 7c36a1af03 Move engine-api client package il y a 8 ans
client_windows.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_attach.go fc8097f957 Add Logs to ContainerAttachOptions il y a 8 ans
container_commit.go 3a1279393f Use distribution reference il y a 8 ans
container_commit_test.go 773ae28dae expected new_container_id while testing ContainerCommit il y a 8 ans
container_copy.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_copy_test.go 40b8ff6243 Optimize the log info for client test il y a 8 ans
container_create.go 0ea7b143b0 Don't use AutoRemove on older daemons il y a 8 ans
container_create_test.go 0ea7b143b0 Don't use AutoRemove on older daemons il y a 8 ans
container_diff.go b83d9bf6a9 Generate ContainerChanges from swagger spec. il y a 8 ans
container_diff_test.go b83d9bf6a9 Generate ContainerChanges from swagger spec. il y a 8 ans
container_exec.go e98e4a7111 always add but hide experimental cmds and flags il y a 8 ans
container_exec_test.go 01883c136d Add an IDResponse type il y a 8 ans
container_export.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_export_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_inspect_test.go 773ae28dae expected new_container_id while testing ContainerCommit il y a 8 ans
container_kill.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_kill_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
container_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
container_logs.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_logs_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_pause.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_pause_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` il y a 8 ans
container_prune_test.go 58738cdee3 Add `--filter until=<timestamp>` for `docker container/image prune` il y a 8 ans
container_remove.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_remove_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_rename.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_rename_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_resize.go 53774423ff Windows: OCI process struct convergence il y a 8 ans
container_resize_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_restart.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_restart_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_start.go bd7d51292c Allow providing a custom storage directory for docker checkpoints il y a 8 ans
container_start_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_stats.go d8dcbf3ec3 Tidy GetDockerOS() function il y a 8 ans
container_stats_test.go 7a86930c74 Merge pull request #26436 from stevvooe/remove-transport-package il y a 8 ans
container_stop.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_stop_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_top.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. il y a 8 ans
container_top_test.go 16bdbaaa33 Convert ContainerTopOKResponse from swagger spec. il y a 8 ans
container_unpause.go 7c36a1af03 Move engine-api client package il y a 8 ans
container_unpause_test.go 9a072adff3 client: remove transport package il y a 8 ans
container_update.go f196cf6a09 Generate container update response from swagger spec. il y a 8 ans
container_update_test.go f196cf6a09 Generate container update response from swagger spec. il y a 8 ans
container_wait.go 181562c2e5 Generate ContainerWait response from the swagger spec. il y a 8 ans
container_wait_test.go 181562c2e5 Generate ContainerWait response from the swagger spec. il y a 8 ans
disk_usage.go f830d52dd0 Add DiskUsage method to SystemApiclient il y a 8 ans
errors.go 34148978bd print error if unsupported flags are used il y a 8 ans
events.go 47585996bf Fixes a race condition in client events monitoring il y a 8 ans
events_test.go d6bd79c18f Refactor to new events api il y a 8 ans
hijack.go d32ffb72b7 Refactor client/request il y a 8 ans
image_build.go b1996728aa Update docs and code to use application/x-tar in the build API il y a 8 ans
image_build_test.go b1996728aa Update docs and code to use application/x-tar in the build API il y a 8 ans
image_create.go 3a1279393f Use distribution reference il y a 8 ans
image_create_test.go 9a072adff3 client: remove transport package il y a 8 ans
image_history.go b462c93edb Generate ImageHistory from swagger spec. il y a 8 ans
image_history_test.go b462c93edb Generate ImageHistory from swagger spec. il y a 8 ans
image_import.go 3a1279393f Use distribution reference il y a 8 ans
image_import_test.go 773ae28dae expected new_container_id while testing ContainerCommit il y a 8 ans
image_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
image_inspect_test.go 9a072adff3 client: remove transport package il y a 8 ans
image_list.go c6e31454ba Fixes ImageList to be retro-compatible with older API il y a 8 ans
image_list_test.go c6e31454ba Fixes ImageList to be retro-compatible with older API il y a 8 ans
image_load.go 7c36a1af03 Move engine-api client package il y a 8 ans
image_load_test.go 9a072adff3 client: remove transport package il y a 8 ans
image_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` il y a 8 ans
image_prune_test.go 64978c1365 Fix ImageDelete type il y a 8 ans
image_pull.go 3a1279393f Use distribution reference il y a 8 ans
image_pull_test.go 3a1279393f Use distribution reference il y a 8 ans
image_push.go 3a1279393f Use distribution reference il y a 8 ans
image_push_test.go 3a1279393f Use distribution reference il y a 8 ans
image_remove.go 5988b84e4f Generate ImageDeleteResponse from swagger spec. il y a 8 ans
image_remove_test.go 5988b84e4f Generate ImageDeleteResponse from swagger spec. il y a 8 ans
image_save.go 7c36a1af03 Move engine-api client package il y a 8 ans
image_save_test.go 9a072adff3 client: remove transport package il y a 8 ans
image_search.go 7c36a1af03 Move engine-api client package il y a 8 ans
image_search_test.go c1ce63b17b api/types/container,client: gofmt il y a 8 ans
image_tag.go 3a1279393f Use distribution reference il y a 8 ans
image_tag_test.go a041697cab check both source_image_tag and target_image_tag for 'docker image tag' il y a 8 ans
info.go 7c36a1af03 Move engine-api client package il y a 8 ans
info_test.go 514ca09426 api: types: keep info.SecurityOptions a string slice il y a 8 ans
interface.go 03c6949739 Add docker plugin upgrade il y a 8 ans
interface_experimental.go c410222e42 move plugins out of experimental il y a 8 ans
interface_stable.go 7781a1bf0f Make experimental a runtime flag il y a 8 ans
login.go 16233eb055 Fix the inconsistent function name for client il y a 8 ans
network_connect.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_connect_test.go 9a072adff3 client: remove transport package il y a 8 ans
network_create.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_create_test.go 9a072adff3 client: remove transport package il y a 8 ans
network_disconnect.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_disconnect_test.go 9a072adff3 client: remove transport package il y a 8 ans
network_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_inspect_test.go 773ae28dae expected new_container_id while testing ContainerCommit il y a 8 ans
network_list.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_list_test.go 9a072adff3 client: remove transport package il y a 8 ans
network_prune.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` il y a 8 ans
network_prune_test.go 58738cdee3 Add `--filter until=<timestamp>` for `docker container/image prune` il y a 8 ans
network_remove.go 7c36a1af03 Move engine-api client package il y a 8 ans
network_remove_test.go 9a072adff3 client: remove transport package il y a 8 ans
node_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
node_inspect_test.go 7c3657065c change minor mistake of spelling il y a 8 ans
node_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
node_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
node_remove.go 7c36a1af03 Move engine-api client package il y a 8 ans
node_remove_test.go 9a072adff3 client: remove transport package il y a 8 ans
node_update.go 7c36a1af03 Move engine-api client package il y a 8 ans
node_update_test.go 9a072adff3 client: remove transport package il y a 8 ans
ping.go 7c3657065c change minor mistake of spelling il y a 8 ans
plugin_create.go b1996728aa Update docs and code to use application/x-tar in the build API il y a 8 ans
plugin_disable.go 8cb2229cd1 Enforce zero plugin refcount during disable. il y a 8 ans
plugin_disable_test.go 8cb2229cd1 Enforce zero plugin refcount during disable. il y a 8 ans
plugin_enable.go 83ca993c15 Add HTTP client timeout. il y a 8 ans
plugin_enable_test.go 83ca993c15 Add HTTP client timeout. il y a 8 ans
plugin_inspect.go 1c96879f1e Merge pull request #28963 from vieux/refactor_plugin_install il y a 8 ans
plugin_inspect_test.go 7781a1bf0f Make experimental a runtime flag il y a 8 ans
plugin_install.go 3a1279393f Use distribution reference il y a 8 ans
plugin_list.go a66e0dc349 Add `--filter enabled=true` for `docker plugin ls` il y a 8 ans
plugin_list_test.go 99d91ada97 Add `capability` filter to `docker plugin ls` il y a 8 ans
plugin_push.go 3d86b0c79b Implement content addressability for plugins il y a 8 ans
plugin_push_test.go 3d86b0c79b Implement content addressability for plugins il y a 8 ans
plugin_remove.go 7781a1bf0f Make experimental a runtime flag il y a 8 ans
plugin_remove_test.go 773ae28dae expected new_container_id while testing ContainerCommit il y a 8 ans
plugin_set.go 7781a1bf0f Make experimental a runtime flag il y a 8 ans
plugin_set_test.go 7781a1bf0f Make experimental a runtime flag il y a 8 ans
plugin_upgrade.go 3a1279393f Use distribution reference il y a 8 ans
request.go 16233eb055 Fix the inconsistent function name for client il y a 8 ans
request_test.go 9a072adff3 client: remove transport package il y a 8 ans
secret_create.go 31d9ce6f5c remove unused headers in secret_create.go il y a 8 ans
secret_create_test.go 86d7682843 update secret create url for consistency il y a 8 ans
secret_inspect.go 3716ec25b4 secrets: secret management for swarm il y a 8 ans
secret_inspect_test.go 7c3657065c change minor mistake of spelling il y a 8 ans
secret_list.go b2e4c7f3b5 review updates il y a 8 ans
secret_list_test.go b2e4c7f3b5 review updates il y a 8 ans
secret_remove.go 3716ec25b4 secrets: secret management for swarm il y a 8 ans
secret_remove_test.go 3716ec25b4 secrets: secret management for swarm il y a 8 ans
secret_update.go 6ec84ef76d Add integration test for stack deploy with secrets. il y a 8 ans
secret_update_test.go 77b8465d7e Add SecretUpdate method to client il y a 8 ans
service_create.go 7c36a1af03 Move engine-api client package il y a 8 ans
service_create_test.go 9a072adff3 client: remove transport package il y a 8 ans
service_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
service_inspect_test.go 7c3657065c change minor mistake of spelling il y a 8 ans
service_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
service_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
service_logs.go 819d0159bb api: Service Logs support il y a 8 ans
service_logs_test.go 819d0159bb api: Service Logs support il y a 8 ans
service_remove.go 7c36a1af03 Move engine-api client package il y a 8 ans
service_remove_test.go 9a072adff3 client: remove transport package il y a 8 ans
service_update.go 948e60691e Return warnings from service create and service update when digest pinning fails il y a 8 ans
service_update_test.go 948e60691e Return warnings from service create and service update when digest pinning fails il y a 8 ans
swarm_get_unlock_key.go 0f9fc54df9 Revise swarm init/update flags, add unlocking capability il y a 8 ans
swarm_init.go 113cae5ba2 Change tls to TLS il y a 8 ans
swarm_init_test.go 9a072adff3 client: remove transport package il y a 8 ans
swarm_inspect.go 113cae5ba2 Change tls to TLS il y a 8 ans
swarm_inspect_test.go 9a072adff3 client: remove transport package il y a 8 ans
swarm_join.go 113cae5ba2 Change tls to TLS il y a 8 ans
swarm_join_test.go 9a072adff3 client: remove transport package il y a 8 ans
swarm_leave.go 113cae5ba2 Change tls to TLS il y a 8 ans
swarm_leave_test.go 9a072adff3 client: remove transport package il y a 8 ans
swarm_unlock.go 5c0ea56d56 remove redundant code and better error msg il y a 8 ans
swarm_update.go 113cae5ba2 Change tls to TLS il y a 8 ans
swarm_update_test.go 9a072adff3 client: remove transport package il y a 8 ans
task_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
task_inspect_test.go 9a072adff3 client: remove transport package il y a 8 ans
task_list.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
task_list_test.go 89a6966726 Replace all "Filter" field with "Filters" for consistency il y a 8 ans
transport.go 8f9a48ab5a Merge pull request #29565 from yuexiao-wang/fix-typo-tls il y a 8 ans
utils.go a6be56b54e Convert DanglingOnly to Filters for `docker image prune` il y a 8 ans
version.go 7c36a1af03 Move engine-api client package il y a 8 ans
volume_create.go 29df3bdb11 Use a config to generate swagger api types il y a 8 ans
volume_create_test.go 29df3bdb11 Use a config to generate swagger api types il y a 8 ans
volume_inspect.go 7c36a1af03 Move engine-api client package il y a 8 ans
volume_inspect_test.go 9a072adff3 client: remove transport package il y a 8 ans
volume_list.go 29df3bdb11 Use a config to generate swagger api types il y a 8 ans
volume_list_test.go 29df3bdb11 Use a config to generate swagger api types il y a 8 ans
volume_prune.go 5c0ea56d56 remove redundant code and better error msg il y a 8 ans
volume_remove.go e98e4a7111 always add but hide experimental cmds and flags il y a 8 ans
volume_remove_test.go 9a072adff3 client: remove transport package il y a 8 ans

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.