To run builds with Depot via docker, you still need to connect the build to an active Depot project via the depot init and depot.json files or via the DEPOT_PROJECT_ID environment variable.
Depot can directly integrate with your existing Docker workflows via a one-time configuration command from our depot CLI. See our instructions for installing our CLI if you still need to do so.
With the CLI installed, you can run configure-docker to configure your Docker CLI to use Depot as the default handler for docker build and docker buildx build:
depot configure-dockerUnderneath the hood, the configure-docker command installs Depot as a Docker CLI plugin and sets the plugin as the default Docker builder (i.e., docker build). In addition, the command also installs a Depot buildx driver and sets that driver as the default driver for docker buildx build.
docker buildOnce your docker environment is configured to use Depot, you can run your builds as usual.
docker build --platform linux/amd64,linux/arm64 .If you have correctly configured your Depot project via depot init or DEPOT_PROJECT_ID, your build will automatically be sent to Depot for execution. You can confirm this by looking for log lines in the output that are prefixed with [depot].
docker buildx buildSimilarly, once your environment is configured to use Depot, you can run your docker buildx build commands as usual.
docker buildx build --platform linux/amd64,linux/arm64 .Again, you can confirm that builds are going to your Depot project by looking for log lines that are prefixed with [depot] or by checking out the builds for your project.
You can efficiently build Compose service images in parallel with Depot, with either depot bake --load -f ./docker-compose.yml or docker compose build. See the Docker Compose integration guide for more information.