daemon: NewDaemon(): check system requirements early


**- A picture of a cute animal (not mandatory but encouraged)**


daemon/daemon_unsupported.go
//go:build !linux && !freebsd && !windows
// +build !linux,!freebsd,!windows

package daemon // import "github.com/docker/docker/daemon"

import (
	"github.com/docker/docker/daemon/config"
	"github.com/docker/docker/pkg/sysinfo"
)

const platformSupported = false

func setupResolvConf(config *config.Config) {
}

func getSysInfo(daemon *Daemon) *sysinfo.SysInfo {
	return sysinfo.New()
}

//go:build !linux && !freebsd && !windows
// +build !linux,!freebsd,!windows

package daemon // import "github.com/docker/docker/daemon"

import (
	"errors"

	"github.com/docker/docker/pkg/sysinfo"
)

func checkSystem() error {
	return errors.New("the Docker daemon is not supported on this platform")
}

func setupResolvConf(_ *interface{}) {}

func getSysInfo(_ *Daemon) *sysinfo.SysInfo {
	return sysinfo.New()
}

We should probably remove this file altogether, as it currently doesn't even compile (too many `_linux.go` files), but as there were attempts to at least make the package compile, I kept it for now.