Codebase
Navigate the Codebase using the tree view. Use the filters to highlight where various files are grouped to aid understanding.
Getting Started Commands
Project Structure
Below is a short description of the key directories of the project to aid you when understanding where key files are located.
api - This directory contains the server-side implementation of the Docker API. It includes various subdirectories for different API endpoints, such as backend, router, container, network, plugin, session, swarm, system, and volume.
builder - This directory contains the code for building Docker images. It includes various subdirectories for different build components, such as builder-next, builder, and remotecontext.
cli - This directory contains the command-line interface (CLI) for interacting with Docker. It includes various subdirectories for different CLI components, such as debug and winresources.
client - This directory contains the client-side implementation of the Docker API. It includes various subdirectories for different client components, such as build_prune, checkpoint, and container.
dockerfile - This directory contains the code for parsing and building Docker images based on Dockerfiles.
go.mod and go.sum - These files are used by Go to manage dependencies for the project.
moby - This directory contains the main Docker application code.
pkg - This directory contains the Go packages used by the project.
test - This directory contains the test code for the project.
vendor - This directory contains the third-party dependencies used by the project.
Entrypoints
Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.
/cmd/docker-proxy/main.go - Contains functions for starting the Docker proxy, parsing flags, and handling stop signals.
/cmd/dockerd/docker.go - Contains functions for initializing the Docker daemon and creating the main command.
/cmd/dockerd/trap/testfiles/main.go - Contains the main function for test files related to Docker daemon traps.
/contrib/apparmor/main.go - Contains the main function for AppArmor integration.
/contrib/httpserver/server.go - Contains the main function for an HTTP server.
/integration/plugin/logging/cmd/close_on_start/main.go - Contains the main function for a plugin that closes logs on start.
/integration/plugin/logging/cmd/discard/main.go - Contains the main function for a plugin that discards logs.
/integration/plugin/logging/cmd/dummy/main.go - Contains the main function for a dummy logging plugin.
/integration/plugin/volumes/cmd/dummy/main.go - Contains the main function for a dummy volume plugin.
/libnetwork/cmd/diagnostic/main.go - Contains functions for HTTP diagnostics, fetching node peers, and fetching tables.
/libnetwork/cmd/networkdb-test/testMain.go - Contains the main function for network database tests.
/pkg/archive/example_changes.go - Contains the main function for preparing untar source directories for archive tests.
/pkg/plugins/pluginrpc-gen/main.go - Contains functions for error handling, checking flags, and generating plugin RPC code.
/profiles/seccomp/generate.go - Contains the main function for generating seccomp profiles.
/testutil/fixtures/plugin/basic/basic.go - Contains the main function for plugin testing with a basic fixture.
/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go - Contains functions for generating AWS logging code.
/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go - Contains the main function for generating Go code using gogo.
/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go - Contains the main function for generating Go code using gogofaster.
/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go - Contains the main function for generating Go code using gogoslick.
/vendor/github.com/golang/protobuf/protoc-gen-go/main.go - Contains the main function for generating Go code using the official protobuf plugin.
/vendor/golang.org/x/tools/cmd/stringer/stringer.go - Contains functions for generating stringer code.