We use cookies to understand how people use Depot.
Container Builds

Quickstart for faster Docker image builds with Depot

Below is a guide to leveraging Depot for up to 40x faster container image builds with a literal drop-in replacement for docker build.

We also offer managed GitHub Actions Runners with 10x faster caching. You can get started with our runners in our GitHub Actions Overview docs.

Installing the CLI

For Mac, you can install the CLI with Homebrew:

brew install depot/tap/depot

For Linux, you can install the CLI with our installation script:

# Install the latest version
curl -L https://depot.dev/install-cli.sh | sh
 
# Install a specific version
curl -L https://depot.dev/install-cli.sh | sh -s 2.45.5

For all other platforms, you can download the binary directly from the latest release.

Creating an organization

Organizations are the top level entity in Depot. They typically represent a single company or team. Billing details are attached to an organization.

  1. Login to your Depot account to get to your list of organizations
  2. Click on the Create Organization button
  3. Enter an organization name
  4. Click Create organization
  5. Click New project and specify your preferred region, cache storage policy, and connection.

If you're not quite ready to create your own project, every organization comes pre-configured with a default project that you can use for any container image build. The default project is placed in our US East region with a cache storage policy of 50 GB per image architecture. If you'd like to change those defaults, you can go into the Project > Settings and make any changes.

Running a local build

There are two options for running local builds with Depot.

Using Depot with our depot build command

Our depot build command is a drop-in replacement for your existing docker build command.

Once you've created your project in the Depot app, you can run depot build to build your Docker image. The build command takes all of the same parameters as your normal docker build command.

depot build -t repo/image:tag .

Your first depot build locally will ask you to authenticate with Depot and choose the project for your build. The CLI will prompt you to save this project in a depot.json file in your repository. This file is used to remember your project for future builds.

Note: You can also specify a DEPOT_PROJECT_ID environment variable instead of saving a depot.json file.

Using Depot with your existing docker build command

There is the option to configure your existing docker build commmands to leverage Depot behind the scenes for the build. This is done by configuring Depot as a plugin for the Docker CLI. You can see our depot configure-docker docs for more information.

Running a build in CI

Integrating Depot into your CI workflow is a very similar process. Depot works with any CI provider. You can find guides for our most popular providers:

Adding a build minute usage cap

By default, an organization is allowed to use unlimited build minutes in a month. However, you can configure a usage cap on your organization to avoid runaway costs.

  1. Go to your organizations inside of Depot and select your organization
  2. Click on the Settings button
  3. Under the Usage caps section you can choose between two options:
  • Unlimited: By default organizations are configured to use unlimited build minutes in a month
  • Limit build minutes: You can enter a fixed number of build minutes that your organization is allowed to use in a month. Once the limit is reached, builds will fail to start until the limit is raised or reset.