updated prose and structure for driver docs
Signed-off-by: David Karlsson <david.karlsson@docker.com>pull/1334/head
							parent
							
								
									e98c252490
								
							
						
					
					
						commit
						d030fcc076
					
				| @ -1,48 +1,30 @@ | |||||||
| # Docker driver | # Docker driver | ||||||
| 
 | 
 | ||||||
| The buildx docker driver is the default builtin driver, that uses the BuildKit | The Buildx Docker driver is the default driver. It uses the BuildKit server | ||||||
| server components built directly into the docker engine. | components built directly into the Docker engine. The Docker driver requires no | ||||||
|  | configuration. | ||||||
| 
 | 
 | ||||||
| No setup should be required for the docker driver - it should already be | Unlike the other drivers, builders using the Docker driver can't be manually | ||||||
| configured for you: | created. They're only created automatically from the Docker context. | ||||||
| 
 | 
 | ||||||
| ```console | Images built with the Docker driver are automatically loaded to the local image | ||||||
| $ docker buildx ls | store. | ||||||
| NAME/NODE       DRIVER/ENDPOINT      STATUS   BUILDKIT PLATFORMS |  | ||||||
| default         docker                                  |  | ||||||
|   default       default              running  20.10.17 linux/amd64, linux/386 |  | ||||||
| ``` |  | ||||||
| 
 | 
 | ||||||
| This builder is ready to build with out-of-the-box, requiring no extra setup, | ## Synopsis | ||||||
| so you can get going with a `docker buildx build` as soon as you like. |  | ||||||
| 
 |  | ||||||
| Depending on your personal setup, you may find multiple builders in your list |  | ||||||
| the use the docker driver. For example, on a system that runs both a package |  | ||||||
| managed version of dockerd, as well as Docker Desktop, you might have the |  | ||||||
| following: |  | ||||||
| 
 | 
 | ||||||
| ```console | ```console | ||||||
| NAME/NODE       DRIVER/ENDPOINT STATUS  BUILDKIT PLATFORMS | # The Docker driver is used by buildx by default | ||||||
| default         docker                            | docker buildx build . | ||||||
|   default       default         running 20.10.17 linux/amd64, linux/386 |  | ||||||
| desktop-linux * docker                            |  | ||||||
|   desktop-linux desktop-linux   running 20.10.17 linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6 |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| This is because the docker driver builders are automatically pulled from | It's not possible to configure which BuildKit version to use, or to pass any | ||||||
| the available [Docker Contexts](https://docs.docker.com/engine/context/working-with-contexts/). | additional BuildKit parameters to a builder using the Docker driver. The | ||||||
| When you add new contexts using `docker context create`, these will appear in | BuildKit version and parameters are preset by the Docker engine internally. | ||||||
| your list of buildx builders. |  | ||||||
| 
 |  | ||||||
| Unlike the [other drivers](./index.md), builders using the docker driver |  | ||||||
| cannot be manually created, and can only be automatically created from the |  | ||||||
| docker context. Additionally, they cannot be configured to a specific BuildKit |  | ||||||
| version, and cannot take any extra parameters, as these are both preset by the |  | ||||||
| Docker engine internally. |  | ||||||
| 
 | 
 | ||||||
| If you want the extra configuration and flexibility without too much more | If you need additional configuration and flexibility, consider using the | ||||||
| overhead, then see the help page for the [docker-container driver](./docker-container.md). | [Docker container driver](./docker-container.md). | ||||||
| 
 | 
 | ||||||
| ## Further reading | ## Further reading | ||||||
| 
 | 
 | ||||||
| For more information on the docker driver, see the [buildx reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver). | For more information on the Docker driver, see the | ||||||
|  | [buildx reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver). | ||||||
|  | |||||||
| @ -1,39 +1,78 @@ | |||||||
| # Buildx drivers overview | # Buildx drivers overview | ||||||
| 
 | 
 | ||||||
| The buildx client connects out to the BuildKit backend to execute builds - | Buildx drivers are configurations for how and where the BuildKit backend runs. | ||||||
| Buildx drivers allow fine-grained control over management of the backend, and | Driver settings are customizable and allows fine-grained control of the builder. | ||||||
| supports several options for where and how BuildKit should run. | Buildx supports the following drivers: | ||||||
| 
 | 
 | ||||||
| Currently, we support the following drivers: | - `docker`: uses the BuildKit library bundled into the Docker daemon. | ||||||
| 
 | - `docker-container`: creates a dedicated BuildKit container using Docker. | ||||||
| - The `docker` driver, that uses the BuildKit library bundled into the Docker | - `kubernetes`: creates BuildKit pods in a Kubernetes cluster. | ||||||
|   daemon. | - `remote`: connects directly to a manually managed BuildKit daemon. | ||||||
|   ([guide](./docker.md), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#docker-driver-1)) | 
 | ||||||
| - The `docker-container` driver, that launches a dedicated BuildKit container | Different drivers support different use cases. The default `docker` driver | ||||||
|   using Docker, for access to advanced features. | prioritizes simplicity and ease of use. It has limited support for advanced | ||||||
|   ([guide](./docker-container.md), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#docker-container-driver-1)) | features like caching and output formats, and isn't configurable. Other drivers | ||||||
| - The `kubernetes` driver, that launches dedicated BuildKit pods in a | provide more flexibility and are better at handling advanced scenarios. The | ||||||
|   remote Kubernetes cluster, for scalable builds. | `kubernetes` and `remote` drivers specifically aim to enable remote builders. | ||||||
|   ([guide](./kubernetes.md), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#kubernetes-driver-1)) | 
 | ||||||
| - The `remote` driver, that allows directly connecting to a manually managed | The following table outlines some of the differences between drivers. | ||||||
|   BuildKit daemon, for more custom setups. | 
 | ||||||
|   ([guide](./remote.md), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#remote-driver-1)) | | Feature                      |  `docker`   | `docker-container` | `kubernetes` |      `remote`      | | ||||||
| 
 | | :--------------------------- | :---------: | :----------------: | :----------: | :----------------: | | ||||||
| To create a new builder that uses one of the above drivers, you can use the | | **Automatically load image** |     Yes     |         No         |      No      |         No         | | ||||||
| [`docker buildx create`](https://docs.docker.com/engine/reference/commandline/buildx_create/) command: | | **Cache export**             | Inline only |        Yes         |     Yes      |        Yes         | | ||||||
|  | | **Remote builders**          |     No      |         No         |     Yes      |        Yes         | | ||||||
|  | | **Tarball output**           |     No      |        Yes         |     Yes      |        Yes         | | ||||||
|  | | **Multi-arch images**        |     No      |        Yes         |     Yes      |        Yes         | | ||||||
|  | | **BuildKit configuration**   |     No      |        Yes         |     Yes      | Managed externally | | ||||||
|  | 
 | ||||||
|  | ## List available drivers | ||||||
|  | 
 | ||||||
|  | Use `docker buildx ls` to see builder instances available on your system, and | ||||||
|  | the drivers they're using. | ||||||
|  | 
 | ||||||
|  | ```console | ||||||
|  | $ docker buildx ls | ||||||
|  | NAME/NODE       DRIVER/ENDPOINT      STATUS   BUILDKIT PLATFORMS | ||||||
|  | default         docker | ||||||
|  |   default       default              running  20.10.17 linux/amd64, linux/386 | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | Depending on your setup, you may find multiple builders in your list that use | ||||||
|  | the Docker driver. For example, on a system that runs both a manually installed | ||||||
|  | version of dockerd, as well as Docker Desktop, you might see the following | ||||||
|  | output from `docker buildx ls`: | ||||||
|  | 
 | ||||||
|  | ```console | ||||||
|  | NAME/NODE       DRIVER/ENDPOINT STATUS  BUILDKIT PLATFORMS | ||||||
|  | default         docker | ||||||
|  |   default       default         running 20.10.17 linux/amd64, linux/386 | ||||||
|  | desktop-linux * docker | ||||||
|  |   desktop-linux desktop-linux   running 20.10.17 linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6 | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | This is because the Docker driver builders are automatically pulled from the | ||||||
|  | available | ||||||
|  | [Docker Contexts](https://docs.docker.com/engine/context/working-with-contexts/). | ||||||
|  | When you add new contexts using `docker context create`, these will appear in | ||||||
|  | your list of buildx builders. | ||||||
|  | 
 | ||||||
|  | ## Create a new builder | ||||||
|  | 
 | ||||||
|  | Use the | ||||||
|  | [`docker buildx create`](https://docs.docker.com/engine/reference/commandline/buildx_create/) | ||||||
|  | command to create a builder, and specify the driver using the `--driver` option. | ||||||
| 
 | 
 | ||||||
| ```console | ```console | ||||||
| $ docker buildx create --name=<builder-name> --driver=<driver> --driver-opt=<driver-options> | $ docker buildx create --name=<builder-name> --driver=<driver> --driver-opt=<driver-options> | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| The build experience is very similar across drivers, however, there are some | ## What's next | ||||||
| features that are not evenly supported across the board, notably, the `docker` | 
 | ||||||
| driver does not include support for certain output/caching types. | Read about each of the Buildx drivers to learn about how they work and how to | ||||||
| 
 | use them: | ||||||
| | Feature                       |    `docker`     | `docker-container` | `kubernetes` |        `remote`        | | 
 | ||||||
| | :---------------------------- | :-------------: | :----------------: | :----------: | :--------------------: | | - [Docker driver](./docker.md) | ||||||
| | **Automatic `--load`**        |        ✅        |         ❌          |      ❌       |           ❌            | | - [Docker container driver](./docker-container.md) | ||||||
| | **Cache export**              | ❔ (inline only) |         ✅          |      ✅       |           ✅            | | - [Kubernetes driver](./kubernetes.md) | ||||||
| | **Docker/OCI tarball output** |        ❌        |         ✅          |      ✅       |           ✅            | | - [Remote driver](./remote.md) | ||||||
| | **Multi-arch images**         |        ❌        |         ✅          |      ✅       |           ✅            | |  | ||||||
| | **BuildKit configuration**    |        ❌        |         ✅          |      ✅       | ❔ (managed externally) | |  | ||||||
|  | |||||||
					Loading…
					
					
				
		Reference in New Issue
	
	 David Karlsson
						David Karlsson