-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Is your feature request related to a problem? Please describe.
I'm using v2.4 yml as I need to pass extra_hosts to the builder and v3 doesn't seem to support that (yet). I'm evaluating using docker-compose with BuildKit but it seems that extra_hosts are not propagated all the way to the Docker CLI [1].
[1] https://github.com/docker/compose/blob/1.26.0-rc3/compose/service.py#L1790-L1802
Describe the solution you'd like
It would be great if _CLIBuilder made use of extra_hosts, as they seem to be properly passed down to it [2].
[2] https://github.com/docker/compose/blob/1.26.0-rc3/compose/service.py#L1085-L1100
Describe alternatives you've considered
I tried mounting my own hosts file on top of /etc/hosts but it doesn't seem to be possible inside a "normal" (i.e. unpriviledged, etc.) container.
I also thought about patching docker-compose locally & maintaining a fork, but it doesn't really make sense given that the default (non-CLI) builder works correctly and that I don't stricly need BuildKit (it was meant to be a nice bonus).