docker/docker

The legacy Go client library for the Docker Engine API, used to build and manage containers, images, and daemons programmatically.

SDK
Go
vv28.5.2+incompatible
72,069stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
97/100Excellent
Development Activity96
Maintenance96
Community96
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture62
Code Quality88
Innovation68
Learning Curve90

github.com/docker/docker is the original Go module path for the Docker Engine, the same codebase that today lives on as the Moby Project. For years it was how Go programs talked to the Docker daemon: importing docker/docker/client and docker/docker/api/types to list containers, build images, and drive the exact operations the docker CLI itself uses.

As of Docker v29 (released November 2025), this import path is deprecated and frozen; new development happens under github.com/moby/moby/client and github.com/moby/moby/api instead. Existing code that already imports docker/docker continues to build against the last tagged release, but new projects should migrate to the split client/api modules to get future updates and security fixes.

What You Get

  • A typed HTTP client (client.Client) covering every Docker Engine API endpoint: containers, images, networks, volumes, exec, swarm, and system info
  • Shared API request/response types under api/types so client calls and daemon responses use the same structs
  • Automatic API version negotiation against the daemon it connects to
  • Environment-based client configuration via client.FromEnv (DOCKER_HOST, DOCKER_API_VERSION, DOCKER_CERT_PATH, DOCKER_TLS_VERIFY)

Common Use Cases

  • Building custom container orchestration or CI tooling that needs to start, stop, and inspect containers programmatically
  • Writing integration tests that spin up throwaway containers as test fixtures
  • Building internal developer platforms that wrap docker build/push behind an API
  • Monitoring a Docker host by polling container and system stats through the API instead of shelling out to the CLI

Under The Hood

Architecture The docker/docker module root is the full Moby Engine monorepo; the portion actually consumed via this legacy import path is client/ (the HTTP client, with per-resource files like container_list.go and image_build.go) and api/types/ (shared request/response structs generated from an API swagger definition). The client wraps a single http.Client plus a transport abstraction (client_unix.go/client_windows.go) that dials either a TCP+TLS endpoint or a local Unix/Windows socket, giving callers one uniform client.Client interface regardless of transport. Version negotiation happens once per client instance against the daemon’s version endpoint, then every subsequent call embeds the negotiated version in its request path. Because the module also contains the daemon, builder, and swarm orchestration code, importing anything outside client/ and api/ pulls in the full engine dependency graph, which is exactly why the project split the client and API packages into their own go.mod files under the newer moby/moby/v2 layout, and why this combined legacy path is now frozen.

Tech Stack The client itself has a modest dependency footprint compared to the engine: go-winio for Windows named pipes, docker/go-connections and docker/go-units for connection dialing and byte-size formatting, opencontainers/image-spec and go-digest for OCI-compatible image references, and OpenTelemetry’s otelhttp for optional request tracing. The split client and api modules require Go 1.24+, while the engine root now requires a newer Go toolchain. Requests are plain net/http calls against the Engine API’s versioned REST+JSON surface, with no client-side code generation; request and response shapes are hand-maintained Go structs.

Code Quality client/ carries over a hundred *_test.go files alongside their implementation files, one test file per endpoint, using the standard testing package plus gotest.tools for assertions and an in-process fake transport rather than a real daemon. Errors are wrapped through containerd’s errdefs packages to preserve not-found/conflict/unauthorized semantics across the wire instead of returning opaque strings. The wider engine repository runs an extensive CI matrix across Linux and Windows, static analysis, and supply-chain scanning, among the more thorough setups of any Go project in this catalog.

API Design The client’s functional-options pattern for construction keeps setup terse while remaining extensible without breaking signatures, and its environment-driven configuration mirrors the exact variables the docker CLI itself honors, so code written against this client behaves identically to the CLI in the same environment. The tradeoff is that this legacy import path bundles the client inside the full engine module, so consumers pull in package layout meant for the daemon, not just the SDK, exactly the friction the project’s split into separate client and api modules was designed to fix. Method naming maps directly to REST resources and verbs, which is predictable but produces a very large single client interface rather than resource-scoped sub-clients.

Used by 13 apps in this directory

Go
73%
GPL 3.0

1Panel

Devops · Hosting Control Panel · Monitoring

36,820

The only open-source VPS control panel with native AI agent runtime — deploy websites, Docker stacks, and local LLMs from one web interface.

View details
90
Repo Health
76
Technical
67
Dependency
Built with
Go73%
Vue27%
Updated 3 days ago
Go
92%
AGPL 3.0

BillionMail

Marketing

15,533

Self-hosted email server and marketing platform that gives you unlimited sending, full deliverability control, and AI-assisted campaigns without monthly fees.

View details
57
Repo Health
74
Technical
70
Dependency
Built with
Go92%
Updated 2 months ago
Go
59%
Apache 2.0

Cog

AI Development · Devops · Developer Tools

9,468

An open-source CLI that packages machine learning models into standard, production-ready Docker containers — no Dockerfile wrangling, no CUDA version hell.

View details
89
Repo Health
88
Technical
69
Dependency
Built with
Go59%
Rust17%
HTML13%
Updated 5 days ago
Go
49%
Other

Cosmos-Server

Security · Authentication

6,146

All-in-one self-hosted home server with SmartShield anti-DDoS, Nebula mesh VPN, automatic HTTPS, and a 250-app marketplace — all secured behind a unified auth layer.

View details
85
Repo Health
59
Technical
64
Dependency
Built with
Go49%
JavaScript48%
Updated 2 days ago
Go
92%
AGPL 3.0

Cozy Stack

File Storage · Productivity

1,270

Self-hosted personal cloud platform that unifies your files, apps, and devices in one private space you fully control.

View details
94
Repo Health
77
Technical
67
Dependency
Built with
Go92%
Updated 3 days ago
Go
62%
Apache 2.0

Harness Open Source

Developer Tools · Devops · Code Editors

38,251

A unified open source DevOps platform combining Git hosting, CI/CD pipelines, cloud development environments, and artifact registries in a single self-hosted system.

View details
89
Repo Health
79
Technical
64
Dependency
Built with
Go62%
TypeScript34%
Updated 3 days ago
Go
84%
MIT

Hatchet

AI Development · Developer Tools · Automation

7,885

A Postgres-backed orchestration engine for background tasks, AI agents, and durable workflows that replaces Redis queues and multi-datastore durable execution platforms with a single self-hostable service.

View details
87
Repo Health
83
Technical
67
Dependency
Built with
Go84%
PLpgSQL11%
Updated 2 days ago
TypeScript
97%
Other

Infisical

Security · Devops

29,145

The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.

View details
91
Repo Health
84
Technical
65
Dependency
Built with
TypeScript97%
Updated yesterday
Go
95%
Other

NetBird

Security

28,957

Replace your VPN with a zero-trust WireGuard overlay network that auto-connects devices, enforces SSO and posture checks, and deploys in under 5 minutes.

View details
91
Repo Health
82
Technical
66
Dependency
Built with
Go95%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search