Get entitlement error when using host network
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
I'm trying to build an image using host network, but get the following entitlement error. I can build using the standard docker build command with host network, so I'm not sure what is the cause of the error.
error: failed to solve: rpc error: code = Unknown desc = granting entitlement network.host is not allowed by build daemon configuration
Here is the command I use to build:
docker buildx create --name test --platform linux/amd64,linux/arm64 --driver docker-container --driver-opt "image=moby/buildkit:master,network=host" --buildkitd-flags "--allow-insecure-entitlement network.host" --use
docker buildx build --allow network.host --network host --builder test --push --build-arg VERSION=673cda6 -t test .
Here is the docker and buildx version information:
docker version
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.40
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:46:45 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 19.03.13-ce
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46
Built: Mon Oct 12 18:51:50 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.1
GitCommit: c623d1b36f09f8ef6536a057bd658b3aa8632828
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker buildx version
github.com/docker/buildx v0.5.1-docker 11057da37336192bfc57d81e02359ba7ba848e4a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported docker buildx create and docker buildx build commands, then trace how the network.host entitlement and --allow-insecure-entitlement network.host settings reach the build daemon. Reproduce the error with the stated Docker and buildx versions; done means identifying the configuration mismatch or documenting the required setup for a successful host-network build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100