diff --git a/pkg/cli/cmds/root.go b/pkg/cli/cmds/root.go index b18c5d8f05..c612ef3740 100644 --- a/pkg/cli/cmds/root.go +++ b/pkg/cli/cmds/root.go @@ -2,6 +2,7 @@ package cmds import ( "fmt" + "os" "github.com/rancher/k3s/pkg/version" "github.com/sirupsen/logrus" @@ -12,6 +13,13 @@ var ( debug bool ) +func init() { + // hack - force "file,dns" lookup order if go dns is used + if os.Getenv("RES_OPTIONS") == "" { + os.Setenv("RES_OPTIONS", " ") + } +} + func NewApp() *cli.App { app := cli.NewApp() app.Name = appName diff --git a/scripts/build b/scripts/build index 96ac81028f..03c366130d 100755 --- a/scripts/build +++ b/scripts/build @@ -33,7 +33,7 @@ fi STATIC_SQLITE=" -extldflags '-static -lm -ldl -lz -lpthread $DQLITE_STATIC_SQLITE' " -TAGS="ctrd apparmor seccomp no_btrfs netgo osusergo providerless $DQLITE_TAGS" +TAGS="ctrd apparmor seccomp no_btrfs netcgo osusergo providerless $DQLITE_TAGS" if [ "$STATIC_BUILD" != "true" ]; then STATIC="