You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
As a Developer I want to be able to build Windows Containers with BuildKit #34
Reacted by Jérôme, Klaus Frank, alexey-gusarov, Jorge Arteiro, Guillaume Lecomte, Thomas Piskol, GordPollock-AI, Alan Fregtman, jjcaballero, Andrey Moor and 126 more
Reacted by Quang Kieu, J.F. Larente, Christian Korneck, YassinHajaj, chmely, Meir Gabay, Yatima, Yegun Kim, Λlisue, Paul Lemke and 3 more
James Sturtevant (@jsturtevant) If you wanted to go down that path, I believe Wine can be used with binfmt_misc, although I'm not sure how well that would work with namespaces since there's a WineServer and configuration directory to create, and you probably don't want that in the final image...
It would be easier to prototype that on a raw Linux box than via the Linux support in Docker on Windows, I think.
Current status of my work on moby/buildkit#616 is that it's stalled waiting on a pile of 4 containerd PRs to be reviewed and advanced. The top of the stack is containerd/containerd#4419, but there's some outstanding design questions on the top two PRs regarding HCS behaviours, see microsoft/hcsshim#853, but the bottom two are just pending containerd maintainer review to merge or rework as appropriate.
And after that, will come fixing path-related issues in the BuildKit LLB layer, for which I'd only scratched the surface of in moby/buildkit#1621, exploring the solution space, and which needs to be reworked per maintainer feedback.
Reacted by Quang Kieu, Micah Young, GordPollock-AI, J.F. Larente, Florian Berchtold, Christian Korneck, YassinHajaj, Yin Yee Lai, Alan Fregtman, Bahram Maravandi and 7 more
Status unchanged, still waiting on merging or feedback on containerd support for Windows container creation/export/mount support, and then continuing the work on BuildKit itself, starting from moby/buildkit#1621
Still working through containerd PRs per above. One of four has landed, and one needs to be rewritten or at least iterated upon further. I've also opened PR on hcsshim again to remove some duplication of code with the containerd PRs.
That said, Docker is looking at supporting containerd on Windows for 21.x (moby/moby#41455), which might mean we get BuildKit on Docker+containerd even without that containerd PR stack, as the parts I was trying to implement in containerd (WCOW layer management) are provided by Docker when Docker uses containerd, as far as I know.
I haven't looked closely at how BuildKit integrates with Docker though, it's possible it'll still need fixes in containerd, and either way, BuildKit itself has higher-level issues to be resolved, e.g., moby/buildkit#1621.
While we're still waiting for the official updates, I was able to get docker buildx build working, and with networking support too (docker buildx create --driver=remote npipe:////./pipe/buildkitd)! Thanks to the great work by Marat Radchenko (@slonopotamus) and Anthony Nandaa (@profnandaa)
I also succeeded running BuildX with WCOW, based on the instructions from profnandaa's gist ( https://gist.github.com/profnandaa/9ad40dbd90ebad99896ee0fed2916406), and relying on the fact that managed containerd is now working with Docker Engine as well (not only Docker Desktop) - so no need to register the containerd service, created a configuration for it, start it, etc.
In short, Windows 11 25H2, Docker Engine 29.1.4, downloaded containerd 2.0.7 binaries in the same location where the Docker Engine binaries are, added:
to the docker configuration, downloaded the buildx plugin executable in C:\ProgramData\Docker\cli-plugins and restarted the docker service.
Just to point out that trying newer containerd versions (2.1.x, 2.2.x) failed; docker buildx build continues to work fine, but docker run fails:
docker: Error response from daemon: failed to create task for container: failed to create shim task: ttrpc: closed
Also, an interesting fact is that docker build run explicitly, also fails (I assumed if $DOCKER_BUILDKIT=1, docker build becomes an alias for docker buildx build - but maybe I got this wrong).
Thanks for all the hard work on WCOW! 🤞
Reacted by Michael Kriese
microsoft-github-policy-service commented on Feb 17, 2026
How do we expand VHD size beyond 20GB when using containerd snapshotter on Windows? It seems like storage-opts is ignored in daemon.json by docker build when containerd snapshotter is enabled.
Status update: BuildKit on WCOW is working end-to-end for us in production CI (Windows 11 25H2 / build 26200), via Docker's containerd image store.
Following up on my earlier note about the containerd shim regression — that's now resolved, and the whole path is working. Summary in case it helps others landing here:
What works
Plain docker build with a machine-wide DOCKER_BUILDKIT=1 routes through the BuildKit embedded in Docker Engine 29 — no docker buildx build rewrite needed in consuming repos.
Requires the containerd image store: daemon.json needs both"default-runtime": "io.containerd.runhcs.v1"and"features": { "containerd-snapshotter": true } (on the Windows static daemon the first is mandatory or dockerd refuses to start).
containerd is dockerd-managed (containerd.exe + containerd-shim-runhcs-v1.exe next to dockerd.exe) plus the docker-buildx CLI plugin.
Gotchas worth flagging
containerd shim version: the ttrpc: closed / nil-deref regression in containerd-shim-runhcs-v1.exe affects 2.1.x, 2.2.0–2.2.2, and 2.3.0. Use 2.3.1 (or ≥ 2.2.3; 2.0.7 also predates it). Skip 2.3.0.
Strict os.version matching in the containerd image store: it rejects manifests whose os.version doesn't match down-level (the classic windowsfilter store was lenient). On 25H2 (10.0.26200) this broke tools pinned to older helper images (e.g. …servercore21H2 = 10.0.20348) with no matching manifest for windows(10.0.26200); pinning to the newest published servercore24H2 (10.0.26100) fixes it.
BuildKit rejects --memory=… on Windows (no support for Linux resource limits on Windows); --isolation=hyperv is ignored under BuildKit (real only on the classic builder).
Perf caveat: BuildKit's layer export + unpack is slow on WCOW — full-rebuild pipelines can be slower than the classic builder until --mount=type=cache / registry build-cache are wired.
Storage angle (CimFS) for anyone chasing the "images larger than actual size" problem: containerd already ships a working CimFS snapshotter and differ, and on 25H2 (26200) they work end-to-end via ctr (pull → unpack via the cimfs differ → run a CimFS-rooted container). It's just not wired into any default config (diff-service order + transfer unpack_config), and Docker Engine currently exposes no way to select it. Block/verified/merged CIM are still OS-gated off on all GA Windows (hcsshim gates them to build ≥ 27766/27800, currently placeholder). I'll file the dockerd-side wiring gap separately.
Reacted by Hervé Le Meur and Ian King'ori
Reacted by Michael Kriese and schletti2000
microsoft-github-policy-service commented on Aug 12, 2026
Indeed, it is working, I'm also running it, in production, for automated bulds. I was chasing CimFS as snapshotter, in the hope that it's faster, but it's true that the point of this issue was to use BuildKit on Windows for building images - and this is fully possible.
Reacted by Mateusz Łoskot, Christian Korneck and Marat Radchenko
I know this might sound a bit disrespectful, but the Microsoft employees responsible for this issue—bob sira (@bobsira) and Dawei Wei (@rzlink) —may well have left Microsoft by now.
microsoft-github-policy-service commented on Nov 16, 2026
Activity
jsturtevant commentedon Jul 2, 2020
It is possible to use buildx (which uses buildkit) if there are no
RUNcommands in the docker file:It would be interesting to see if could use some windows emulator connected to Binfmt_misc as QEMU is used for other architectures
jorgearteiro commentedon Jul 7, 2020
There is an issue logged on BuildKit repo moby/buildkit#616
TBBle commentedon Jul 8, 2020
James Sturtevant (@jsturtevant) If you wanted to go down that path, I believe Wine can be used with binfmt_misc, although I'm not sure how well that would work with namespaces since there's a WineServer and configuration directory to create, and you probably don't want that in the final image...
It would be easier to prototype that on a raw Linux box than via the Linux support in Docker on Windows, I think.
TBBle commentedon Sep 17, 2020
Current status of my work on moby/buildkit#616 is that it's stalled waiting on a pile of 4 containerd PRs to be reviewed and advanced. The top of the stack is containerd/containerd#4419, but there's some outstanding design questions on the top two PRs regarding HCS behaviours, see microsoft/hcsshim#853, but the bottom two are just pending containerd maintainer review to merge or rework as appropriate.
And after that, will come fixing path-related issues in the BuildKit LLB layer, for which I'd only scratched the surface of in moby/buildkit#1621, exploring the solution space, and which needs to be reworked per maintainer feedback.
TBBle commentedon Oct 20, 2020
Status unchanged, still waiting on merging or feedback on containerd support for Windows container creation/export/mount support, and then continuing the work on BuildKit itself, starting from moby/buildkit#1621
immuzz commentedon Oct 22, 2020
Kevin Parsons (@kevpar) Do you have any information on the containerd PRs mentioned above?
TBBle commentedon Dec 22, 2020
Still working through containerd PRs per above. One of four has landed, and one needs to be rewritten or at least iterated upon further. I've also opened PR on hcsshim again to remove some duplication of code with the containerd PRs.
That said, Docker is looking at supporting containerd on Windows for 21.x (moby/moby#41455), which might mean we get BuildKit on Docker+containerd even without that containerd PR stack, as the parts I was trying to implement in containerd (WCOW layer management) are provided by Docker when Docker uses containerd, as far as I know.
I haven't looked closely at how BuildKit integrates with Docker though, it's possible it'll still need fixes in containerd, and either way, BuildKit itself has higher-level issues to be resolved, e.g., moby/buildkit#1621.
178 remaining items
gorban commentedon Dec 15, 2025
While we're still waiting for the official updates, I was able to get
docker buildx buildworking, and with networking support too (docker buildx create --driver=remote npipe:////./pipe/buildkitd)! Thanks to the great work by Marat Radchenko (@slonopotamus) and Anthony Nandaa (@profnandaa)inistor commentedon Jan 18, 2026
I also succeeded running BuildX with WCOW, based on the instructions from profnandaa's gist ( https://gist.github.com/profnandaa/9ad40dbd90ebad99896ee0fed2916406), and relying on the fact that managed containerd is now working with Docker Engine as well (not only Docker Desktop) - so no need to register the containerd service, created a configuration for it, start it, etc.
In short, Windows
11 25H2, Docker Engine29.1.4, downloaded containerd2.0.7binaries in the same location where the Docker Engine binaries are, added:to the docker configuration, downloaded the buildx plugin executable in
C:\ProgramData\Docker\cli-pluginsand restarted the docker service.Just to point out that trying newer containerd versions (2.1.x, 2.2.x) failed;
docker buildx buildcontinues to work fine, butdocker runfails:Also, an interesting fact is that
docker buildrun explicitly, also fails (I assumed if$DOCKER_BUILDKIT=1,docker buildbecomes an alias fordocker buildx build- but maybe I got this wrong).Thanks for all the hard work on WCOW! 🤞
microsoft-github-policy-service commentedon Feb 17, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
microsoft-github-policy-service commentedon Mar 22, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
microsoft-github-policy-service commentedon Apr 23, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
microsoft-github-policy-service commentedon May 25, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
slonopotamus commentedon Jun 21, 2026
How do we expand VHD size beyond 20GB when using containerd snapshotter on Windows? It seems like storage-opts is ignored in
daemon.jsonbydocker buildwhen containerd snapshotter is enabled.UPD: According to moby/moby#49906 and microsoft/hcsshim#2541, there is no way currently.
UPD2: Reported as moby/moby#53030
UPD3: Suggested a PR: containerd/containerd#13743
inistor commentedon Jul 13, 2026
Status update: BuildKit on WCOW is working end-to-end for us in production CI (Windows 11 25H2 / build 26200), via Docker's containerd image store.
Following up on my earlier note about the containerd shim regression — that's now resolved, and the whole path is working. Summary in case it helps others landing here:
What works
docker buildwith a machine-wideDOCKER_BUILDKIT=1routes through the BuildKit embedded in Docker Engine 29 — nodocker buildx buildrewrite needed in consuming repos.daemon.jsonneeds both"default-runtime": "io.containerd.runhcs.v1"and"features": { "containerd-snapshotter": true }(on the Windows static daemon the first is mandatory or dockerd refuses to start).containerd.exe+containerd-shim-runhcs-v1.exenext todockerd.exe) plus thedocker-buildxCLI plugin.Gotchas worth flagging
ttrpc: closed/ nil-deref regression incontainerd-shim-runhcs-v1.exeaffects 2.1.x, 2.2.0–2.2.2, and 2.3.0. Use 2.3.1 (or ≥ 2.2.3; 2.0.7 also predates it). Skip 2.3.0.os.versiondoesn't match down-level (the classicwindowsfilterstore was lenient). On 25H2 (10.0.26200) this broke tools pinned to older helper images (e.g.…servercore21H2= 10.0.20348) withno matching manifest for windows(10.0.26200); pinning to the newest publishedservercore24H2(10.0.26100) fixes it.--memory=…on Windows (no support for Linux resource limits on Windows);--isolation=hypervis ignored under BuildKit (real only on the classic builder).--mount=type=cache/ registry build-cache are wired.Storage angle (CimFS) for anyone chasing the "images larger than actual size" problem: containerd already ships a working CimFS snapshotter and differ, and on 25H2 (26200) they work end-to-end via
ctr(pull → unpack via thecimfsdiffer → run a CimFS-rooted container). It's just not wired into any default config (diff-service order + transferunpack_config), and Docker Engine currently exposes no way to select it. Block/verified/merged CIM are still OS-gated off on all GA Windows (hcsshim gates them to build ≥ 27766/27800, currently placeholder). I'll file the dockerd-side wiring gap separately.microsoft-github-policy-service commentedon Aug 12, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
microsoft-github-policy-service commentedon Sep 11, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
microsoft-github-policy-service commentedon Oct 12, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.
mloskot commentedon Oct 16, 2026
Building WCOW with BuildKit, containerd and nerdctl on Windows Server 2020 works for me. I'm currently using the following versions:
Perhaps this old issue should now be closed to avoid confusions, then move into phase of submitting specific issues.
inistor commentedon Oct 16, 2026
Indeed, it is working, I'm also running it, in production, for automated bulds. I was chasing CimFS as snapshotter, in the hope that it's faster, but it's true that the point of this issue was to use BuildKit on Windows for building images - and this is fully possible.
linghengqian commentedon Oct 16, 2026
microsoft-github-policy-service commentedon Nov 16, 2026
This issue has been open for 30 days with no updates.
Dawei Wei (@rzlink), bob sira (@bobsira), please provide an update or close this issue.