diff --git a/misc/docker/dock.go b/misc/docker/dock.go index 1f453968e..c79d7ed4e 100644 --- a/misc/docker/dock.go +++ b/misc/docker/dock.go @@ -103,9 +103,6 @@ func genCamlistore(ctxDir string) { func genBinaries(ctxDir string) { check(os.Mkdir(filepath.Join(ctxDir, "/camlistore.org"), 0755)) image := goDockerImage - if *buildOS != "linux" { - image += "-" + *buildOS - } args := []string{ "run", "--rm", @@ -358,11 +355,10 @@ func main() { // using docker all along, and it's convenient for now for code reuse. I // can refactor it all out of dock.go afterwards if we like the process. if *doBinaries { - goDir := "go" - if *buildOS != "linux" { - goDir = path.Join(goDir, *buildOS) - } - buildDockerImage(goDir, goDockerImage+"-"+*buildOS) + // TODO(mpl): consider using an "official" or trusted existing + // Go docker image, since we don't do anything special anymore in + // ours? + buildDockerImage("go", goDockerImage+"-linux") ctxDir, err := ioutil.TempDir("", "camli-build") if err != nil { log.Fatal(err) diff --git a/misc/docker/go/Dockerfile b/misc/docker/go/Dockerfile index 7434ef4bb..f812043c4 100644 --- a/misc/docker/go/Dockerfile +++ b/misc/docker/go/Dockerfile @@ -7,11 +7,6 @@ RUN apt-get -y --no-install-recommends install ca-certificates libc6-dev # Get Go stable release WORKDIR /tmp -# TODO(mpl): good enough for now with binary version. switch back to src tarball when go1.5 is out, if needed. -RUN curl -O https://storage.googleapis.com/golang/go1.5rc1.linux-amd64.tar.gz -RUN echo '2abf55effd93f5c2dcef306eaf14d3e7f614a407 go1.5rc1.linux-amd64.tar.gz' | sha1sum -c -RUN tar -C /usr/local -xzf go1.5rc1.linux-amd64.tar.gz - -# rebuild Go with cgo disabled so we can build static binaries -#WORKDIR /usr/local/go/src -#RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=linux ./make.bash +RUN curl -O https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz +RUN echo '46eecd290d8803887dec718c691cc243f2175fe0 go1.5.1.linux-amd64.tar.gz' | sha1sum -c +RUN tar -C /usr/local -xzf go1.5.1.linux-amd64.tar.gz diff --git a/misc/docker/go/darwin/Dockerfile b/misc/docker/go/darwin/Dockerfile deleted file mode 100644 index 65d04e2cc..000000000 --- a/misc/docker/go/darwin/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright 2015 The Camlistore Authors. -FROM camlistore/go -WORKDIR /usr/local/go/src -RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin ./make.bash --no-clean diff --git a/misc/docker/release/build-binaries.go b/misc/docker/release/build-binaries.go index da934d07d..ae5db6c0d 100644 --- a/misc/docker/release/build-binaries.go +++ b/misc/docker/release/build-binaries.go @@ -118,6 +118,7 @@ func fetchCamliSrc() { func build() { check(os.Chdir("/gopath/src/camlistore.org")) oldPath := os.Getenv("PATH") + // Note: no need to set GO15VENDOREXPERIMENT because make.go does it. os.Setenv("GOPATH", "/gopath") os.Setenv("PATH", "/usr/local/go/bin:"+oldPath) cmd := exec.Command("go", "run", "make.go", "--use_gopath", "--os", *buildOS)