From 79466b9bd36f122933ca8c6884d5d928aeca28a4 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 18 Dec 2023 18:08:20 +0100 Subject: [PATCH] build(cloud): use with Docker Compose Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/build/cloud/usage.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/build/cloud/usage.md b/content/build/cloud/usage.md index c15a967573..1b93f83138 100644 --- a/content/build/cloud/usage.md +++ b/content/build/cloud/usage.md @@ -49,6 +49,25 @@ confusion with regards to builder selection. Alternatively, you can run `docker buildx install` to make the default `docker build` command behave like `docker buildx build`, without discrepancies. +## Use with Docker Compose + +To build with Docker Build Cloud using `docker compose build`, first set the +cloud builder as your selected builder, then run your build. + +> **Note** +> +> Make sure you're using a supported version of Docker Compose, see +> [Prerequisites](setup.md#prerequisites). + +```console +$ docker buildx use cloud-- +$ docker compose build +``` + +In addition to `docker buildx use`, you can also use the `docker compose build +--builder` flag or the [`BUILDX_BUILDER` environment +variable](../building/env-vars.md#buildx_builder) to select the cloud builder. + ## Loading build results Building with `--tag` loads the build result to the local image store