Don't bind resolv.conf, copy on import
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/container"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -35,10 +34,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
syscall.Mount("", "/", "", syscall.MS_PRIVATE, "")
|
||||
syscall.Mount("/dev", path.Join(containerPath, "/dev"), "", syscall.MS_BIND, "")
|
||||
|
||||
if util.IsFile(path.Join(containerPath, "/etc/resolv.conf")) == true {
|
||||
syscall.Mount("/etc/resolv.conf", path.Join(containerPath, "/etc/resolv.conf"), "", syscall.MS_BIND, "")
|
||||
}
|
||||
|
||||
for _, b := range binds {
|
||||
var source string
|
||||
var dest string
|
||||
|
||||
Reference in New Issue
Block a user