Browse code

Docker currently doesn't support 32-bit hosts. Let's make that clear by failing right away with an informative message

Solomon Hykes authored on 2013/03/21 18:04:10
Showing 1 changed files
... ...
@@ -12,10 +12,12 @@ import (
12 12
 	"github.com/dotcloud/docker/rcli"
13 13
 	"io"
14 14
 	"io/ioutil"
15
+	"log"
15 16
 	"net/http"
16 17
 	"net/url"
17 18
 	"os"
18 19
 	"path"
20
+	"runtime"
19 21
 	"strconv"
20 22
 	"strings"
21 23
 	"sync"
... ...
@@ -993,6 +995,9 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout io.Writer, args ...string)
993 993
 
994 994
 func NewServer() (*Server, error) {
995 995
 	future.Seed()
996
+	if runtime.GOARCH != "amd64" {
997
+		log.Fatalf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH)
998
+	}
996 999
 	// if err != nil {
997 1000
 	// 	return nil, err
998 1001
 	// }