#Does dagger support passing --add-host to buildkit?
1 messages · Page 1 of 1 (latest)
no, that API is not exposed since we haven't thought about the UX for it yet. May I ask what are you trying to achieve? Maybe there's a differnet way of doing it?
+1 to Marco's questions
Maybe you could use container => host networking once https://github.com/dagger/dagger/pull/5557 lands:
ctr.WithServiceBinding(
"myhost", // desired hostname
c.Host().ReverseProxy(
"10.87.0.1:1234", // target ip:port
1234, // connect via myhost:1234
),
)
It's not the exact same, but on the plus side it will work from any network instead of requiring Buildkit to be able to reach the target IP
Due to some network issues I sometimes change /etc/hosts to point a host to an IP for downloading artifacts or testing external services (assume that DNS is not possible to update) and since /etc/hosts is read-only during the execution of buildkit, i'll have to use --add-hosts in this case
As for different way of doing what I'm trying to achieve, I can say yes (using different records that I have control of and pass as arguments maybe), but it would be nice to have this option for some niche cases