mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
spec, pod: honor --dns
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -46,6 +46,13 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er
|
||||
if len(p.HostAdd) > 0 {
|
||||
options = append(options, libpod.WithPodHosts(p.HostAdd))
|
||||
}
|
||||
if len(p.DNSServer) > 0 {
|
||||
var dnsServers []string
|
||||
for _, d := range p.DNSServer {
|
||||
dnsServers = append(dnsServers, d.String())
|
||||
}
|
||||
options = append(options, libpod.WithPodDNS(dnsServers))
|
||||
}
|
||||
if len(p.DNSOption) > 0 {
|
||||
options = append(options, libpod.WithPodDNSOption(p.DNSOption))
|
||||
}
|
||||
|
Reference in New Issue
Block a user