Hi,
I was successful in creating a Docker container driver builder on Ubuntu 20.04, which runs under WSL 2.0, using a custom configuration file. Here are my commands:
docker buildx create --name docker-container-driver-builder \
--driver docker-container \
--driver-opt image=<some image name> \
--driver-opt default-load=true \
--config //<full_path_to>.toml
docker buildx inspect --bootstrap --builder docker-container-driver-builder
The .toml
file contains only two lines:
[worker.oci]
max-parallelism = 3
When trying to run on a remote Ubuntu 20.04 VM, I encounter a failure on the second inspect
command. It seems there is an issue with the file being copied into the driver’s container:
> docker-container-driver-builder
> [+] Building 16.3s (1/1) FINISHED
> => ERROR [internal] booting buildkit 16.3s
> => => pulling image amr-registry.caas.intel.com/tpe-dev/devsecops/builder:initial 1.0s
> => => creating container buildx_buildkit_docker-container-driver-athena-builder0 15.2s
> ------
> > [internal] booting buildkit:
> 16.26 failed to load config from /etc/buildkit / buildkitd.toml
> 16.26 7failed to load config from /etc/buildkit / buildkitd.toml
> 16.26 /src/cmd/buildkitd/config/load.go:32
> 16.26 main.main /src/cmd/buildkitd/config/load.go:32
> 16.26 /src/cmd/buildk /src/cmd/buildkitd/main.go:230
> 16.26 github.com/urfave/cli.(*App).Run
> 16.26 . /srcgithub.com/urfave/cli.(*App).Run
> 16.26 main.main
> 16.26 /src/cmd/buildkitd/main.go:main.main
> 16.26 runtime.main
> 16.26 ' /usr/localruntime.main
> 16.26 runtime.goexit
> 16.26 , /usr/local/go/sruntime.goexit
> 16.26 [rootlesskit:child ] error: command [buildki[rootlesskit:child ] error: command [buildkitd --config /etc/buildkit/buildkitd.toml --allow-insecure-entitlement=network.host] exited: exit status 1
> 16.26 buildkitd: open /etc/buildkit/buildkitd.toml: permissionbuildkitd: open /etc/buildkit/buildkitd.toml: permission denied
> 16.26 github.com/moby/buildkit/cmd/buildkitd/config.LoadFile
> 16.26 github.com/moby/buildkit/cmd/buildkitd/config.LoadFile
> 16.26 main.main.func3
> 16.26 /src/cmd/builmain.main.func3
> 16.26 github.com/urfave/cli.HandleActigithub.com/urfave/cli.HandleAction
> 16.26 github.com/urfave/cli.(*App).Run
> 16.26 . /srcgithub.com/urfave/cli.(*App).Run
> 16.26 main.main
> 16.26 /src/cmd/buildkitd/main.go:main.main
> 16.26 runtime.main
> 16.26 ' /usr/localruntime.main
> 16.26 runtime.goexit
> 16.26 , /usr/local/go/sruntime.goexit
> 16.26 [rootlesskit:child ] error: command [buildki[rootlesskit:child ] error: command [buildkitd --config /etc/buildkit/buildkitd.toml --allow-insecure-entitlement=network.host] exited: exit status 1
> 16.26 buildkitd: open /etc/buildkit/buildkitd.toml: permissionbuildkitd: open /etc/buildkit/buildkitd.toml: permission denied
> 16.26 github.com/moby/buildkit/cmd/buildkitd/config.LoadFile
> 16.26 github.com/moby/buildkit/cmd/buildkitd/config.LoadFile
> 16.26 main.main.func3
> 16.26 /src/cmd/builmain.main.func3
> 16.26 github.com/urfave/cli.HandleActigithub.com/urfave/cli.HandleAction
> 16.26 github.com/urfave/cli.(*App).Run
> 16.26 . /srcgithub.com/urfave/cli.(*App).Run
> 16.26 main.main
> 16.26 /src/cmd/buildkitd/main.go:main.main
> 16.26 runtime.main
> 16.26 ' /usr/localruntime.main
> 16.26 runtime.goexit
> 16.26 , /usr/local/go/sruntime.goexit
> 16.26 [rootlesskit:parent] error: child exited: exit status 1
> 16.26 @buildkitd: open /etc/buildkit/buildkitd.toml: permission denied
> 16.26 8failed to load[rootlesskit:parent] error: child exited: exit status 1
> 16.26 failed to load config from /etc/buildkit/buildkitd.toml
> 16.26 7failed to load config from /etc/buildkit/buildkitd.toml
> 16.26 /src/cmd/buildkitd/config/load.go:32
> 16.26 main.main /src/cmd/buildkitd/config/load.go:32
> 16.26 /src/cmd/buildk /src/cmd/buildkitd/main.go:230
> 16.26 /src/vendor/github.com/urfave/cli/ /src/vendor/github.com/urfave/cli/app.go:524
> 16.26 /src/vendor/github.com/urfave/cl /src/vendor/github.com/urfave/cli/app.go:286
> 16.26 /src/cmd/ /src/cmd/buildkitd/main.go:378
> 16.26 /usr/local/g /usr/local/go/src/runtime/proc.go:267
> 16.26 /usr/local/go/ /usr/local/go/src/runtime/asm_amd64.s:1650
> 16.26 [rootlesskit:parent] error: child exited: exit status 1
> 16.26 @buildkitd: open /etc/buildkit/buildkitd.toml: permission denied
> 16.26 8failed to load[rootlesskit:parent] error: child exited: exit status 1
> 16.26 failed to load config from /etc/buildkit/buildkitd.toml
> 16.26 7failed to load config from /etc/buildkit/buildkitd.toml
> 16.26 /src/cmd/buildkitd/config/load.go:32
> 16.26 main.main /src/cmd/buildkitd/config/load.go:32
> 16.26 /src/cmd/buildk /src/cmd/buildkitd/main.go:230
> 16.26 /src/vendor/github.com/urfave/cli/ /src/vendor/github.com/urfave/cli/app.go:524
> 16.26 /src/vendor/github.com/urfave/cl /sr
I have checked permissions/ownership issues, and the fil path provided looks fine. I’ve also verified all configuration files. Tried running on both machines with Docker version 25.04 (client and server) and the latest version, 27.3.1. The issue occurs with both buildx plugin version 0.16.2 and after upgrading to 18.0 (latest). no issues on the WSL machine, and there is a consistent issue on the ubuntu vm 20.04. This can happen on multiple machines with the same attributes.
Any ideas on how to resolve this issue?