|
@@ -43,8 +43,7 @@ var (
|
|
validContainerNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
|
|
validContainerNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
|
|
validContainerNamePattern = regexp.MustCompile(`^/?` + validContainerNameChars + `+$`)
|
|
validContainerNamePattern = regexp.MustCompile(`^/?` + validContainerNameChars + `+$`)
|
|
|
|
|
|
- // TODO Windows. Change this once daemon is up and running.
|
|
|
|
- ErrSystemNotSupported = errors.New("The Docker daemon is only supported on linux")
|
|
|
|
|
|
+ ErrSystemNotSupported = errors.New("The Docker daemon is not supported on this platform.")
|
|
)
|
|
)
|
|
|
|
|
|
type contStore struct {
|
|
type contStore struct {
|
|
@@ -562,7 +561,12 @@ func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
|
|
// Do we have a disabled network?
|
|
// Do we have a disabled network?
|
|
config.DisableBridge = isBridgeNetworkDisabled(config)
|
|
config.DisableBridge = isBridgeNetworkDisabled(config)
|
|
|
|
|
|
- // Check that the system is supported and we have sufficient privileges
|
|
|
|
|
|
+ // Verify the platform is supported as a daemon
|
|
|
|
+ if runtime.GOOS != "linux" && runtime.GOOS != "windows" {
|
|
|
|
+ return nil, ErrSystemNotSupported
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Validate platform-specific requirements
|
|
if err := checkSystem(); err != nil {
|
|
if err := checkSystem(); err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|