buildx icon indicating copy to clipboard operation
buildx copied to clipboard

bake: network host permission not allowed when linking targets

Open brianthelion opened this issue 2 years ago • 3 comments

The .hcl and .json interpreters support contexts: for resolving dependencies between builds.

The .yaml interpreter supports build: network: host to comply with the existing docker-compose spec.

None of the interpreters support both.

brianthelion avatar May 19 '22 23:05 brianthelion

When using target: linking the allow rule for network=host is not carried over to the linking target. This means you get error error: failed to solve: failed to load LLB: network.host is not allowed

tonistiigi avatar May 19 '22 23:05 tonistiigi

Workaround is to define network: host also to the target that is doing the linking. https://gist.github.com/tonistiigi/b5673cf524f6d701c2fe4bf5795753e3#file-gistfile2-txt

tonistiigi avatar May 19 '22 23:05 tonistiigi