From a1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 1 Feb 2022 15:58:27 -0500 Subject: Move each search dns to its own line Alpine does not seem to use search correctly when there are multiple search domains on the same line. It only uses the first with the advent. When podman runs within a separate network we are appending on dns.podman as a search, if you add a search domain, then this causes the local search on network to fail. Signed-off-by: Daniel J Walsh --- cmd/podman/common/netflags.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go index cfe4956b0..9dfe81d62 100644 --- a/cmd/podman/common/netflags.go +++ b/cmd/podman/common/netflags.go @@ -103,7 +103,7 @@ func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet) (*enti opts = &entities.NetOptions{} } - if flags.Changed("add-hosts") { + if flags.Changed("add-host") { opts.AddHosts, err = flags.GetStringSlice("add-host") if err != nil { return nil, err @@ -178,11 +178,9 @@ func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet) (*enti } } - if flags.Changed("no-host") { - opts.NoHosts, err = flags.GetBool("no-hosts") - if err != nil { - return nil, err - } + opts.NoHosts, err = flags.GetBool("no-hosts") + if err != nil { + return nil, err } // parse the network only when network was changed -- cgit v1.2.3-54-g00ecf