Architecture of docker/compose
docker/compose is 383 source files holding 2,008 symbols across 5 modules, written mainly in Go, Dockerfile, Makefile. The largest module is pkg, with 143 files, and 7 files are entry points into the dependency graph.
How compose fits together
The binary starts at cmd/main.go, which is one of the entry points. The run and start subcommands have their own entry points in cmd/compose/run.go and cmd/compose/start.go. The pkg directory is the largest module by file count, with 143 files, and holds the main application code. The internal directory holds 36 files of supporting code. Input is a Compose file that describes the services of an application, and the output is those containers created and started by the commands.
Largest modules
- pkg: 143 files and 21,543 lines of code
- docs: 99 files and 5,901 lines of code
- cmd: 81 files and 9,216 lines of code
- internal: 36 files and 2,003 lines of code
- .github: 14 files and 788 lines of code
- root: 9 files and 1,003 lines of code
- desktop-module: 1 file and 9 lines of code
Languages
By file count: Go 259 files, Dockerfile 1 file, Makefile 1 file, Terraform 1 file.
More on compose: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos