docker / setup-buildx-action

GitHub Action to set up Docker Buildx
https://github.com/marketplace/actions/docker-setup-buildx
Apache License 2.0
905 stars 142 forks source link

Support Windows Agents #292

Closed gburkecw closed 4 months ago

gburkecw commented 5 months ago

Description

Attempting to use this action on 'windows-latest' agents results in the following error during "Booting builder":

C:\Windows\system32\docker.exe buildx inspect --bootstrap --builder builder-6b9f230d-ee8f-43d3-a89f-71c9c655a311

1 [internal] booting buildkit

1 pulling image moby/buildkit:buildx-stable-1

1 pulling image moby/buildkit:buildx-stable-1 2.4s done

1 creating container buildx_buildkit_builder-6b9f230d-ee8f-43d3-a89f-71c9c655a3110 done

1 ERROR: Error response from daemon: Windows does not support privileged mode


[internal] booting buildkit:

ERROR: Error response from daemon: Windows does not support privileged mode Error: The process 'C:\Windows\system32\docker.exe' failed with exit code 1

gburkecw commented 5 months ago

I'm not sure if this action is intended to work on Windows agents or not... but it throws an error after attempting to setup. I am attempting to use the build-and-push action for the GHA caching features, which require buildx. Any advice or workarounds would be appreciated, thanks!

crazy-max commented 5 months ago
ERROR: Error response from daemon: Windows does not support privileged mode

Same as https://github.com/docker/setup-buildx-action/issues/228#issuecomment-1510707981

Why are you using Windows runners? Are you building a Windows container image? If that's the case, BuildKit does not support Windows containers yet. This is tracked in https://github.com/moby/buildkit/issues/616. If not and you're building a Linux container image, then just use the Ubuntu runner.