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.
.github/ - This directory contains GitHub-specific configuration files, such as ISSUE_TEMPLATES and workflows.
.github/ISSUE_TEMPLATE/ - Contains GitHub issue template files used to create consistent issues.
.github/workflows/ - Contains YAML files defining GitHub Actions workflows for automating builds, tests, and deployments.
cli-plugins/ - Contains custom plugins for the Docker CLI.
cli/ - The main directory for the Docker CLI.
cli/command/ - Contains subdirectories for various Docker CLI commands, such as builder, checkpoint, container, context, formatter, image, inspect, manifest, network, node, plugin, registry, secret, service, stack, swarm, system, task, testdata, trust, and volume.
cli/compose/ - Contains the Docker Compose subsystem, which allows defining and running multi-container Docker applications.
cli/config/ - Contains configuration files and related utilities for the Docker CLI.
cli/connhelper/ - Contains utilities for connecting to Docker daemons and registries.
cli/context/ - Contains context-related utilities and configuration files for the Docker CLI.
cli/debug/ - Contains debugging utilities for the Docker CLI.
cli/flags/ - Contains command-line flag definitions for the Docker CLI.
cli/hints/ - Contains hints and suggestions for various Docker CLI commands.
cli/internal/ - Contains internal Docker CLI utilities and libraries.
cli/manifest/ - Contains utilities for working with Docker image manifests.
cli/registry/ - Contains utilities for working with Docker registries.
cli/streams/ - Contains utilities for handling input/output streams in the Docker CLI.
cli/trust/ - Contains utilities for managing trust relationships in the Docker CLI.
cli/version/ - Contains utilities for displaying the Docker CLI version.
cli/winresources/ - Contains Windows-specific resources for the Docker CLI.
cmd/ - Contains the Go command-line interface for the Docker daemon.
cmd/docker/ - Contains the Docker daemon's command-line interface.
contrib/ - Contains community contributions to the Docker project, such as completion scripts for various shells.
dockerfiles/ - Contains example Dockerfiles used for testing and demonstration purposes.
e2e/ - Contains end-to-end test cases for the Docker CLI and daemon.
e2e/cli-plugins/ - Contains test cases for custom Docker CLI plugins.
e2e/container/ - Contains test cases for container-related functionality.
e2e/context/ - Contains test cases for context-related functionality.
e2e/global/ - Contains test cases for global Docker CLI configuration.
e2e/image/ - Contains test cases for image-related functionality.
e2e/internal/ - Contains internal test utilities for the Docker project.
e2e/plugin/ - Contains test cases for plugin functionality.
e2e/registry/ - Contains test cases for registry-related functionality.
e2e/stack/ - Contains test cases for stack-related functionality.
e2e/testdata/ - Contains test data used by the end-to-end tests.
e2e/testutils/ - Contains utility functions for running the end-to-end tests.
experimental/ - Contains experimental features and functionality that may not be stable or fully supported.
hack/ - Contains development and hacking tools for the Docker project.
hack/otel/ - Contains OpenTelemetry integration for the Docker project.
internal/ - Contains internal Docker project code and utilities.
internal/test/ - Contains test cases for internal Docker project code.
internal/test/builders/ - Contains test builders for internal Docker project code.
internal/test/environment/ - Contains test environment setup utilities.
internal/test/network/ - Contains test utilities for working with networks.
internal/test/notary/ - Contains test utilities for working with notary.
internal/test/output/ - Contains test output utilities.
man/ - Contains the Docker CLI manual pages.
man/src/ - Contains the source files for the Docker CLI manual pages.
man/src/container/ - Contains container-related manual page source files.
man/src/image/ - Contains image-related manual page source files.
man/src/network/ - Contains network-related manual page source files.
man/src/plugin/ - Contains plugin-related manual page source files.
man/src/system/ - Contains system-related manual page source files.
man/src/volume/ - Contains volume-related manual page source files.
opts/ - Contains command-line option definitions for the Docker CLI.
pkg/ - Contains package definitions and build files for the Docker project.
pkg/kvfile/ - Contains utilities for working with key-value files.
scripts/ - Contains various scripts used by the Docker project.
scripts/build/ - Contains scripts for building the Docker project.
scripts/test/ - Contains scripts for running tests in the Docker project.
scripts/test/e2e/ - Contains scripts for running end-to-end tests in the Docker project.
service/ - Contains utilities for managing Docker services.
service/logs/ - Contains utilities for managing logs for Docker services.
templates/ - Contains templates used by various parts of the Docker 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.
cli-plugins/examples/helloworld/main.go - Path: cli-plugins/examples/helloworld/main.go
cmd/docker/builder_windows_test.go - Path: cmd/docker/builder_windows_test.go
cmd/docker/docker.go - Path: cmd/docker/docker.go
docs/generate/generate.go - Path: docs/generate/generate.go
e2e/cli-plugins/plugins/badmeta/main.go - Path: e2e/cli-plugins/plugins/badmeta/main.go
e2e/cli-plugins/plugins/nopersistentprerun/main.go - Path: e2e/cli-plugins/plugins/nopersistentprerun/main.go
e2e/cli-plugins/plugins/presocket/main.go - Path: e2e/cli-plugins/plugins/presocket/main.go
e2e/testutils/plugins/basic.go - Path: e2e/testutils/plugins/basic.go
man/generate.go - Path: man/generate.go