sandbox: update to Go 1.4.2, pull tour sources from new location
Change-Id: I8b77d4d0733a8aaf3022e7abe8b0c728b2fcaa7d
Reviewed-on: https://go-review.googlesource.com/7171
Reviewed-by: Minux Ma <minux@golang.org>
diff --git a/sandbox/Dockerfile b/sandbox/Dockerfile
index 3f5b76d..36447e3 100644
--- a/sandbox/Dockerfile
+++ b/sandbox/Dockerfile
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-FROM golang:1.4.1
+FROM golang:1.4.2
# enable faketime
RUN apt-get update && apt-get install -yq --no-install-recommends patch
@@ -21,10 +21,20 @@
# add and compile tour packages
RUN GOOS=nacl GOARCH=amd64p32 go get \
- 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
+ golang.org/x/tour/pic \
+ golang.org/x/tour/reader \
+ golang.org/x/tour/tree \
+ golang.org/x/tour/wc
+
+# 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
# add and compile sandbox daemon
ADD . /go/src/sandbox/