Doug Davis cdb8ea90b0 Fix processing of unset build-args during build пре 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 bd7d51292c Allow providing a custom storage directory for docker checkpoints пре 8 година
checkpoint_list_test.go bd7d51292c Allow providing a custom storage directory for docker checkpoints пре 8 година
client.go a754d89b40 client: add accessor methods for client.customHTTPHeaders пре 8 година
client_mock_test.go 9a072adff3 client: remove transport package пре 8 година
client_test.go f78f7de96a fix t.Errorf to t.Error in serveral _test.go пре 8 година
client_unix.go 7c36a1af03 Move engine-api client package пре 8 година
client_windows.go 7c36a1af03 Move engine-api client package пре 8 година
container_attach.go fc8097f957 Add Logs to ContainerAttachOptions пре 8 година
container_commit.go c8d5e7203e Use IDResponse for container create response. пре 8 година
container_commit_test.go 773ae28dae expected new_container_id while testing ContainerCommit пре 8 година
container_copy.go 7c36a1af03 Move engine-api client package пре 8 година
container_copy_test.go 40b8ff6243 Optimize the log info for client test пре 8 година
container_create.go e98e4a7111 always add but hide experimental cmds and flags пре 8 година
container_create_test.go 925c1427a8 add error information to distinguish different test scene пре 8 година
container_diff.go 7c36a1af03 Move engine-api client package пре 8 година
container_diff_test.go 9a072adff3 client: remove transport package пре 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 e98e4a7111 always add but hide experimental cmds and flags пре 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 7c36a1af03 Move engine-api client package пре 8 година
container_top_test.go 9a072adff3 client: remove transport package пре 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 181562c2e5 Generate ContainerWait response from the swagger spec. пре 8 година
container_wait_test.go 181562c2e5 Generate ContainerWait response from the swagger spec. пре 8 година
disk_usage.go f830d52dd0 Add DiskUsage method to SystemApiclient пре 8 година
errors.go d5dc9b8b1f fix incorrect ErrConnectFailed comparison пре 8 година
events.go d6bd79c18f Refactor to new events api пре 8 година
events_test.go d6bd79c18f Refactor to new events api пре 8 година
hijack.go d32ffb72b7 Refactor client/request пре 8 година
image_build.go d8dcbf3ec3 Tidy GetDockerOS() function пре 8 година
image_build_test.go cdb8ea90b0 Fix processing of unset build-args during build пре 8 година
image_create.go 7c36a1af03 Move engine-api client package пре 8 година
image_create_test.go 9a072adff3 client: remove transport package пре 8 година
image_history.go 7c36a1af03 Move engine-api client package пре 8 година
image_history_test.go 9a072adff3 client: remove transport package пре 8 година
image_import.go 7c36a1af03 Move engine-api client package пре 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 e98e4a7111 always add but hide experimental cmds and flags пре 8 година
image_pull.go 7c36a1af03 Move engine-api client package пре 8 година
image_pull_test.go 9a072adff3 client: remove transport package пре 8 година
image_push.go 7c36a1af03 Move engine-api client package пре 8 година
image_push_test.go 9a072adff3 client: remove transport package пре 8 година
image_remove.go 7c36a1af03 Move engine-api client package пре 8 година
image_remove_test.go 9a072adff3 client: remove transport package пре 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 40b8ff6243 Optimize the log info for client test пре 8 година
image_tag.go 7c36a1af03 Move engine-api client package пре 8 година
image_tag_test.go 9a072adff3 client: remove transport package пре 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 83ca993c15 Add HTTP client timeout. пре 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 9a072adff3 client: remove transport package пре 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 7c36a1af03 Move engine-api client package пре 8 година
network_inspect_test.go 773ae28dae expected new_container_id while testing ContainerCommit пре 8 година
network_list.go 7c36a1af03 Move engine-api client package пре 8 година
network_list_test.go 9a072adff3 client: remove transport package пре 8 година
network_prune.go 7e24c16086 add `docker network prune` пре 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 9a072adff3 client: remove transport package пре 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 година
ping.go e98e4a7111 always add but hide experimental cmds and flags пре 8 година
plugin_create.go 5b6e1bc9e5 Add plugin create functionality. пре 8 година
plugin_disable.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_disable_test.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_enable.go 83ca993c15 Add HTTP client timeout. пре 8 година
plugin_enable_test.go 83ca993c15 Add HTTP client timeout. пре 8 година
plugin_inspect.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_inspect_test.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_install.go 83ca993c15 Add HTTP client timeout. пре 8 година
plugin_list.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_list_test.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_push.go 7781a1bf0f Make experimental a runtime flag пре 8 година
plugin_push_test.go 40b8ff6243 Optimize the log info for client test пре 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 година
request.go 16233eb055 Fix the inconsistent function name for client пре 8 година
request_test.go 9a072adff3 client: remove transport package пре 8 година
secret_create.go 86d7682843 update secret create url for consistency пре 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 3716ec25b4 secrets: secret management for swarm пре 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 година
service_create.go 7c36a1af03 Move engine-api client package пре 8 година
service_create_test.go 9a072adff3 client: remove transport package пре 8 година
service_inspect.go 7c36a1af03 Move engine-api client package пре 8 година
service_inspect_test.go 9a072adff3 client: remove transport package пре 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 948e60691e Return warnings from service create and service update when digest pinning fails пре 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_init.go 7c36a1af03 Move engine-api client package пре 8 година
swarm_init_test.go 9a072adff3 client: remove transport package пре 8 година
swarm_inspect.go 7c36a1af03 Move engine-api client package пре 8 година
swarm_inspect_test.go 9a072adff3 client: remove transport package пре 8 година
swarm_join.go 7c36a1af03 Move engine-api client package пре 8 година
swarm_join_test.go 9a072adff3 client: remove transport package пре 8 година
swarm_leave.go 7c36a1af03 Move engine-api client package пре 8 година
swarm_leave_test.go 9a072adff3 client: remove transport package пре 8 година
swarm_unlock.go b4a667c8c4 Add support for swarm init lock and swarm unlock пре 8 година
swarm_update.go a6030a50c9 Add unlock key rotation пре 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 година
transport.go 401778b7e2 client: deterministically resolve http scheme пре 8 година
utils.go d8dcbf3ec3 Tidy GetDockerOS() function пре 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 e98e4a7111 always add but hide experimental cmds and flags пре 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.