A frontend is a component that takes a human-readable build format and converts
it to LLB so BuildKit can execute it. Frontends can be distributed as images,
and the user can target a specific version of a frontend that is guaranteed to
work for the features used by their definition.
For example, to build a [Dockerfile](/reference/dockerfile.md) with
BuildKit, you would
[use an external Dockerfile frontend](frontend.md).
## Getting started
BuildKit is the default builder for users on Docker Desktop and Docker Engine
v23.0 and later.
If you have installed Docker Desktop, you don't need to enable BuildKit. If you
are running a version of Docker Engine version earlier than 23.0, you can enable
BuildKit either by setting an environment variable, or by making BuildKit the
default setting in the daemon configuration.
To set the BuildKit environment variable when running the `docker build`
command, run:
```console
$ DOCKER_BUILDKIT=1 docker build .
```
> [!NOTE]
>
> Buildx always uses BuildKit.
To use Docker BuildKit by default, edit the Docker daemon configuration in
`/etc/docker/daemon.json` as follows, and restart the daemon.
```json
{
"features": {
"buildkit": true
}
}
```
If the `/etc/docker/daemon.json` file doesn't exist, create new file called
`daemon.json` and then add the following to the file. And restart the Docker
daemon.
## BuildKit on Windows
> [!WARNING]
>
> BuildKit only fully supports building Linux containers. Windows container
> support is experimental.
BuildKit has experimental support for Windows containers (WCOW) as of version 0.13.
This section walks you through the steps for trying it out.
We appreciate any feedback you submit by [opening an issue here](https://github.com/moby/buildkit/issues/new), especially `buildkitd.exe`.
### Known limitations
For information about open bugs and limitations related to BuildKit on Windows,
see [GitHub issues](https://github.com/moby/buildkit/issues?q=is%3Aissue%20state%3Aopen%20label%3Aarea%2Fwindows-wcow).
### Prerequisites
- Architecture: `amd64`, `arm64` (binaries available but not officially tested yet).
- Supported OS: Windows Server 2019, Windows Server 2022, Windows 11.
- Base images: `ServerCore:ltsc2019`, `ServerCore:ltsc2022`, `NanoServer:ltsc2022`.
See the [compatibility map here](https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2019%2Cwindows-11#windows-server-host-os-compatibility).
- Docker Desktop version 4.29 or later
### Steps
> [!NOTE]
>
> The following commands require administrator (elevated) privileges in a PowerShell terminal.
1. Enable the **Hyper-V** and **Containers** Windows features.
```console
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V, Containers -All
```
If you see `RestartNeeded` as `True`, restart your machine and re-open a PowerShell terminal as an administrator.
Otherwise, continue with the next step.
2. Switch to Windows containers in Docker Desktop.
Select the Docker icon in the taskbar, and then **Switch to Windows containers...**.
3. Install containerd version 1.7.7 or later following the setup instructions [here](https://github.com/containerd/containerd/blob/main/docs/getting-started.md#installing-containerd-on-windows).