buildx icon indicating copy to clipboard operation
buildx copied to clipboard

Support custom host-to-IP mappings in `bake` the same way it's done in `build --add-host`

Open unshare opened this issue 5 years ago • 2 comments

See subject. Ideally, it's better be implemented with --set on a per-target basis.

unshare avatar Dec 24 '20 10:12 unshare

This feature could benefit virtually any virtual testing environment (from load testing to E2E testing), primarily if the remote host is behind the proxy and does not support transparent TCP proxying to the host. Services such as Cloudflare provide transparent TCP proxying, but that can come at the cost of a big buck. Therefore we would like to have an opportunity to remap some hosts during the building process and drop silly workarounds like semi-manual modification of hosts file. Moreover, this feature is an old citizen of the legacy builder.

johnbizokk avatar Jan 27 '22 18:01 johnbizokk

It turned out that we cannot modify the hosts file during build time because it is mounted in read-only mode. The last resort is well-designed software that allows the hosts to be overridden, such as cypress (E2E) and k6 (load testing).

johnbizokk avatar Jan 27 '22 20:01 johnbizokk