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, for the Docker Buildx project.
.github/ISSUE_TEMPLATE/ - This subdirectory contains GitHub issue template files that provide a suggested format for creating new issues for the Docker Buildx project.
.github/workflows/ - This subdirectory contains YAML files that define GitHub Actions workflows for the Docker Buildx project.
bake/ - This directory contains the source code for the bake tool, which is used to build and test Docker Buildx.
bake/hclparser/ - This subdirectory contains the source code for the HCL (Hashicorp Configuration Language) parser used by the bake tool.
bake/hclparser/gohcl/ - This subdirectory contains the Go implementation of the HCL parser.
build/ - This directory contains the source code for the build command, which is used to build Docker images using Docker Buildx.
builder/ - This directory contains the source code for the builder command, which is used to create new builders for Docker Buildx.
cmd/ - This directory contains the Go source code for the command-line interface (CLI) of Docker Buildx.
cmd/buildx/ - This subdirectory contains the source code for the buildx command, which is the main entry point for using Docker Buildx to build images.
commands/ - This directory contains the source code for various commands used by Docker Buildx.
commands/debug/ - This subdirectory contains the source code for debugging commands used by Docker Buildx.
commands/imagetools/ - This subdirectory contains the source code for image tools used by Docker Buildx.
controller/ - This directory contains the source code for the controller component of Docker Buildx.
controller/build/ - This subdirectory contains the source code for the build controller, which manages the build process.
controller/control/ - This subdirectory contains the source code for the control plane component of Docker Buildx.
controller/errdefs/ - This subdirectory contains error definition files used by the controller.
controller/local/ - This subdirectory contains the source code for the local controller, which manages builds on the local machine.
controller/pb/ - This subdirectory contains protocol buffer (gRPC) definitions used by the controller.
controller/processes/ - This subdirectory contains the source code for managing processes used by the controller.
controller/remote/ - This subdirectory contains the source code for the remote controller, which manages builds on remote machines.
driver/ - This directory contains the source code for the various drivers used by Docker Buildx.
driver/bkimage/ - This subdirectory contains the source code for the buildkit image driver.
driver/docker-container/ - This subdirectory contains the source code for the Docker container driver.
driver/docker/ - This subdirectory contains the source code for the Docker driver.
driver/kubernetes/ - This subdirectory contains the source code for the Kubernetes driver.
driver/kubernetes/context/ - This subdirectory contains the source code for managing Kubernetes contexts.
driver/kubernetes/execconn/ - This subdirectory contains the source code for managing execution connections to Kubernetes clusters.
driver/kubernetes/manifest/ - This subdirectory contains the source code for managing Kubernetes manifests.
driver/kubernetes/podchooser/ - This subdirectory contains the source code for choosing the appropriate Kubernetes pod for a build.
driver/kubernetes/util/ - This subdirectory contains utility functions used by the Kubernetes driver.
driver/remote/ - This subdirectory contains the source code for the remote driver, which manages builds on remote machines.
driver/remote/util/ - This subdirectory contains utility functions used by the remote driver.
hack/ - This directory contains various development and testing scripts and tools.
hack/demo-env/ - This subdirectory contains environment configurations for testing and demonstrating Docker Buildx.
hack/demo-env/examples/ - This subdirectory contains example usage of Docker Buildx.
hack/dockerfiles/ - This subdirectory contains Dockerfiles used for testing and building Docker Buildx.
localstate/ - This directory contains the local state data for Docker Buildx.
monitor/ - This directory contains the source code for the monitoring component of Docker Buildx.
monitor/commands/ - This subdirectory contains the source code for monitoring commands.
monitor/types/ - This subdirectory contains data types used by the monitoring component.
store/ - This directory contains the data store used by Docker Buildx.
store/storeutil/ - This subdirectory contains utility functions for the data store.
tests/ - This directory contains the test files for Docker Buildx.
tests/workers/ - This subdirectory contains the test workers used by Docker Buildx.
tools/ - This directory contains various tools used by Docker Buildx.
util/ - This directory contains utility functions used by Docker Buildx.
util/buildflags/ - This subdirectory contains utility functions for managing build flags.
util/cobrautil/ - This subdirectory contains utility functions for the Cobra CLI library used by Docker Buildx.
util/cobrautil/completion/ - This subdirectory contains completion functions for the Cobra CLI.
util/confutil/ - This subdirectory contains utility functions for managing configuration files.
util/desktop/ - This subdirectory contains utility functions for managing desktop notifications.
util/dockerutil/ - This subdirectory contains utility functions for interacting with Docker.
util/gitutil/ - This subdirectory contains utility functions for interacting with Git.
util/imagetools/ - This subdirectory contains image tools used by Docker Buildx.
util/ioset/ - This subdirectory contains utility functions for managing I/O sets.
util/logutil/ - This subdirectory contains utility functions for logging.
util/metricutil/ - This subdirectory contains utility functions for managing metrics.
util/osutil/ - This subdirectory contains utility functions for interacting with the operating system.
util/platformutil/ - This subdirectory contains utility functions for managing platform-specific features.
util/progress/ - This subdirectory contains utility functions for managing progress bars.
util/resolver/ - This subdirectory contains utility functions for managing dependencies.
util/tracing/ - This subdirectory contains utility functions for tracing.
util/userfunc/ - This subdirectory contains utility functions for managing user-defined functions.
util/waitmap/ - This subdirectory contains utility functions for managing wait groups.
version/ - This directory contains the version information for Docker Buildx.

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/buildx/main.go - Path: cmd/buildx/main.go
cmd/buildx/tracing.go - Path: cmd/buildx/tracing.go
docs/generate.go - Path: docs/generate.go