You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() - drops the replace-rule for github.com/aws/aws-sdk-go-v2/config (as it no longer was replacing anything)
- drops the replace-rules for docker/cli and docker/docker (at least as long as we continue using tagged releases)
- removes the github.com/docker/docker/pkg/stringid package (which was redundant)
full diff:
|
2 years ago | |
---|---|---|
.. | ||
README.md | 6 years ago | |
build_cancel.go | 4 years ago | |
build_prune.go | 6 years ago | |
checkpoint_create.go | 6 years ago | |
checkpoint_delete.go | 6 years ago | |
checkpoint_list.go | 3 years ago | |
client.go | 3 years ago | |
client_deprecated.go | 6 years ago | |
client_unix.go | 3 years ago | |
client_windows.go | 3 years ago | |
config_create.go | 4 years ago | |
config_inspect.go | 3 years ago | |
config_list.go | 6 years ago | |
config_remove.go | 3 years ago | |
config_update.go | 3 years ago | |
container_attach.go | 3 years ago | |
container_commit.go | 4 years ago | |
container_copy.go | 3 years ago | |
container_create.go | 2 years ago | |
container_diff.go | 6 years ago | |
container_exec.go | 3 years ago | |
container_export.go | 6 years ago | |
container_inspect.go | 3 years ago | |
container_kill.go | 3 years ago | |
container_list.go | 3 years ago | |
container_logs.go | 3 years ago | |
container_pause.go | 6 years ago | |
container_prune.go | 6 years ago | |
container_remove.go | 3 years ago | |
container_rename.go | 6 years ago | |
container_resize.go | 6 years ago | |
container_restart.go | 3 years ago | |
container_start.go | 6 years ago | |
container_stats.go | 4 years ago | |
container_stop.go | 3 years ago | |
container_top.go | 6 years ago | |
container_unpause.go | 6 years ago | |
container_update.go | 4 years ago | |
container_wait.go | 3 years ago | |
disk_usage.go | 3 years ago | |
distribution_inspect.go | 4 years ago | |
envvars.go | 3 years ago | |
errors.go | 3 years ago | |
events.go | 2 years ago | |
hijack.go | 3 years ago | |
image_build.go | 4 years ago | |
image_create.go | 4 years ago | |
image_history.go | 6 years ago | |
image_import.go | 4 years ago | |
image_inspect.go | 3 years ago | |
image_list.go | 2 years ago | |
image_load.go | 6 years ago | |
image_prune.go | 6 years ago | |
image_pull.go | 6 years ago | |
image_push.go | 5 years ago | |
image_remove.go | 3 years ago | |
image_save.go | 6 years ago | |
image_search.go | 3 years ago | |
image_tag.go | 6 years ago | |
info.go | 6 years ago | |
interface.go | 3 years ago | |
interface_experimental.go | 6 years ago | |
interface_stable.go | 6 years ago | |
login.go | 6 years ago | |
network_connect.go | 6 years ago | |
network_create.go | 6 years ago | |
network_disconnect.go | 6 years ago | |
network_inspect.go | 3 years ago | |
network_list.go | 5 years ago | |
network_prune.go | 6 years ago | |
network_remove.go | 3 years ago | |
node_inspect.go | 3 years ago | |
node_list.go | 6 years ago | |
node_remove.go | 3 years ago | |
node_update.go | 3 years ago | |
options.go | 2 years ago | |
ping.go | 3 years ago | |
plugin_create.go | 6 years ago | |
plugin_disable.go | 6 years ago | |
plugin_enable.go | 6 years ago | |
plugin_inspect.go | 3 years ago | |
plugin_install.go | 6 years ago | |
plugin_list.go | 3 years ago | |
plugin_push.go | 6 years ago | |
plugin_remove.go | 3 years ago | |
plugin_set.go | 6 years ago | |
plugin_upgrade.go | 6 years ago | |
request.go | 3 years ago | |
secret_create.go | 4 years ago | |
secret_inspect.go | 3 years ago | |
secret_list.go | 6 years ago | |
secret_remove.go | 3 years ago | |
secret_update.go | 3 years ago | |
service_create.go | 3 years ago | |
service_inspect.go | 3 years ago | |
service_list.go | 5 years ago | |
service_logs.go | 6 years ago | |
service_remove.go | 3 years ago | |
service_update.go | 3 years ago | |
swarm_get_unlock_key.go | 6 years ago | |
swarm_init.go | 6 years ago | |
swarm_inspect.go | 6 years ago | |
swarm_join.go | 6 years ago | |
swarm_leave.go | 6 years ago | |
swarm_unlock.go | 6 years ago | |
swarm_update.go | 3 years ago | |
task_inspect.go | 3 years ago | |
task_list.go | 6 years ago | |
task_logs.go | 6 years ago | |
transport.go | 6 years ago | |
utils.go | 6 years ago | |
version.go | 6 years ago | |
volume_create.go | 3 years ago | |
volume_inspect.go | 3 years ago | |
volume_list.go | 3 years ago | |
volume_prune.go | 6 years ago | |
volume_remove.go | 3 years ago | |
volume_update.go | 3 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.NewClientWithOpts(client.FromEnv)
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)
}
}