Update Go to 1.9.2 in sandbox custom runtime
Also remove empty continuation lines since they will be treated
as errors by Docker in the future.
Change-Id: Ic1c37b63be004414c15fd384bffd07644932c66b
Reviewed-on: https://go-review.googlesource.com/84855
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/sandbox/Dockerfile b/sandbox/Dockerfile
index b65c849..b20cbc4 100644
--- a/sandbox/Dockerfile
+++ b/sandbox/Dockerfile
@@ -7,7 +7,7 @@
ENV GOPATH /go
ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
ENV GOROOT_BOOTSTRAP /usr/local/gobootstrap
-ENV GO_VERSION 1.9
+ENV GO_VERSION 1.9.2
# Fake time
COPY enable-fake-time.patch /usr/local/sandbox/
@@ -21,24 +21,20 @@
RUN set -x && buildDeps='curl ca-certificates gcc patch libc6-dev'; \
apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* && \
-# Get the Go binary.
- curl -sSL https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz -o /tmp/go.tar.gz && \
- curl -sSL https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz.sha256 -o /tmp/go.tar.gz.sha256 && \
+ # Get the Go binary.
+ curl -sSL https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz -o /tmp/go.tar.gz && \
+ curl -sSL https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz.sha256 -o /tmp/go.tar.gz.sha256 && \
echo "$(cat /tmp/go.tar.gz.sha256) /tmp/go.tar.gz" | sha256sum -c - && \
tar -C /usr/local/ -vxzf /tmp/go.tar.gz && \
rm /tmp/go.tar.gz /tmp/go.tar.gz.sha256 && \
-
-# Make a copy for GOROOT_BOOTSTRAP, because we rebuild the toolchain and make.bash removes bin/go as its first step.
+ # Make a copy for GOROOT_BOOTSTRAP, because we rebuild the toolchain and make.bash removes bin/go as its first step.
cp -R /usr/local/go $GOROOT_BOOTSTRAP && \
-
-# Apply the fake time and fake filesystem patches.
+ # Apply the fake time and fake filesystem patches.
patch /usr/local/go/src/runtime/rt0_nacl_amd64p32.s /usr/local/sandbox/enable-fake-time.patch && \
cd /usr/local/go && go run misc/nacl/mkzip.go -p syscall /usr/local/sandbox/fake_fs.lst src/syscall/fstest_nacl.go && \
-
-# Re-build the Go toolchain.
+ # Re-build the Go toolchain.
cd /usr/local/go/src && GOOS=nacl GOARCH=amd64p32 ./make.bash --no-clean && \
-
-# Clean up.
+ # Clean up.
rm -rf $GOROOT_BOOTSTRAP && \
apt-get purge -y --auto-remove $buildDeps
@@ -57,13 +53,13 @@
# Add tour packages under their old import paths (so old snippets still work)
RUN mkdir -p $GOPATH/src/code.google.com/p/go-tour && \
- cp -R $GOPATH/src/golang.org/x/tour/* $GOPATH/src/code.google.com/p/go-tour/ && \
- sed -i 's_// import_// public import_' $(find $GOPATH/src/code.google.com/p/go-tour/ -name *.go) && \
- go install \
- code.google.com/p/go-tour/pic \
- code.google.com/p/go-tour/reader \
- code.google.com/p/go-tour/tree \
- code.google.com/p/go-tour/wc
+ cp -R $GOPATH/src/golang.org/x/tour/* $GOPATH/src/code.google.com/p/go-tour/ && \
+ sed -i 's_// import_// public import_' $(find $GOPATH/src/code.google.com/p/go-tour/ -name *.go) && \
+ go install \
+ code.google.com/p/go-tour/pic \
+ code.google.com/p/go-tour/reader \
+ code.google.com/p/go-tour/tree \
+ code.google.com/p/go-tour/wc
# Add and compile sandbox daemon
COPY . /go/src/sandbox/