We've expanded the functionality of the depot
CLI to allow you to configure docker build
and docker buildx build
to use Depot for all image builds by default. Check out our Docker Compose announcement post for more details.
We are excited to announce that depot
v2.24.0 and above introduces a new command so you can now use Depot to build Docker images anywhere you use docker build
without changing a single line of code 🎉
We've introduced a new command, depot configure-docker
, that installs Depot as a Docker CLI plugin and makes Depot the default builder for docker build
and docker buildx build
commands.
How to set it up
With the latest version of the Depot CLI installed, you can run the following command:
The configure-docker
command installs Depot as a plugin to the Docker CLI and sets the default builder to Depot. The plugin routes your usual docker build
command to Depot builders. Configuring which Depot project your builds should go to can be accomplished via any of the methods below:
- You can set a
DEPOT_PROJECT_ID
environment variable to the project ID of the project you want to use for builds. - You can run
depot init
in the root of the repository in which you're building your image, creating adepot.json
file that our plugin will detect.
After running the command, docker build
is routed through Depot!
depot/use-action
New GitHub Action: We have released a new GitHub Action, depot/use-action
, that you can now use in your workflows. The action allows you to build your Docker images with Depot without changing anything else in your workflow. It does the following steps:
- Installs the
depot
CLI in the GitHub Actions environment - Installs Depot as a Docker CLI plugin
- Sets the Depot plugin as the default Docker builder
The GitHub Action needs to resolve a Depot project ID to use for builds. This can be done via the DEPOT_PROJECT_ID
environment variable, our depot.json
file, or you can specify the project ID directly in the action.
You can authenticate to Depot via our recommended OIDC trust relationships just as you can with our other GitHub Actions.
You can now switch your Docker image builds to leverage Depot by adding a single action to your GitHub Actions workflows. You can add depot/use-action
above your existing docker build
or docker/build-push-action
, and Depot will take over the build.