{"id":37131653,"url":"https://github.com/iansmith/dockerclient","last_synced_at":"2026-01-14T15:16:01.826Z","repository":{"id":19130591,"uuid":"22360193","full_name":"iansmith/dockerclient","owner":"iansmith","description":"Docker client library in Go","archived":false,"fork":true,"pushed_at":"2014-07-24T21:39:03.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T12:57:35.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.docker.com/","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"samalba/dockerclient","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iansmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-28T22:32:04.000Z","updated_at":"2014-07-26T19:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iansmith/dockerclient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iansmith/dockerclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansmith%2Fdockerclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansmith%2Fdockerclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansmith%2Fdockerclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansmith%2Fdockerclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iansmith","download_url":"https://codeload.github.com/iansmith/dockerclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansmith%2Fdockerclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T15:16:00.862Z","updated_at":"2026-01-14T15:16:01.819Z","avatar_url":"https://github.com/iansmith.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Docker client library in Go\n===========================\n[![GoDoc](http://godoc.org/github.com/samalba/dockerclient?status.png)](http://godoc.org/github.com/samalba/dockerclient)\n\nThis library supports few API calls but it will get extended over time.\n\nExample:\n\n```go\npackage main\n\nimport (\n\t\"github.com/samalba/dockerclient\"\n\t\"log\"\n\t\"time\"\n)\n\n// Callback used to listen to Docker's events\nfunc eventCallback(event *dockerclient.Event, args ...interface{}) {\n\tlog.Printf(\"Received event: %#v\\n\", *event)\n}\n\nfunc main() {\n\t// Init the client\n\tdocker, _ := dockerclient.NewDockerClient(\"unix:///var/run/docker.sock\", nil)\n\n\t// Get only running containers\n\tcontainers, err := docker.ListContainers(false)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfor _, c := range containers {\n\t\tlog.Println(c.Id, c.Names)\n\t}\n\n\t// Inspect the first container returned\n\tif len(containers) \u003e 0 {\n\t\tid := containers[0].Id\n\t\tinfo, _ := docker.InspectContainer(id)\n\t\tlog.Println(info)\n\t}\n\n\t// Create a container\n\tcontainerConfig := \u0026dockerclient.ContainerConfig{Image: \"ubuntu:12.04\", Cmd: []string{\"bash\"}}\n\tcontainerId, err := docker.CreateContainer(containerConfig)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Start the container\n\terr = docker.StartContainer(containerId)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Stop the container (with 5 seconds timeout)\n\tdocker.StopContainer(containerId, 5)\n\n\t// Listen to events\n\tdocker.StartMonitorEvents(eventCallback)\n\ttime.Sleep(3600 * time.Second)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiansmith%2Fdockerclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiansmith%2Fdockerclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiansmith%2Fdockerclient/lists"}