commit | c4ae04c716a40dc51f5facb75567153f008c7b02 | [log] [tgz] |
---|---|---|
author | Alexander Rakoczy <alex@golang.org> | Thu Jun 13 14:46:35 2019 -0400 |
committer | Alexander Rakoczy <alex@golang.org> | Fri Jun 14 19:28:08 2019 +0000 |
tree | eaf21035799afffe72610555c1ade3d599822a89 | |
parent | 742871fe54f1361dec093509e7de27fe92f23743 [diff] |
playground: parameterize GO_VERSION in Dockerfile This will allow us to specify a GO_VERSION at build time. Bumps GO_VERSION to go1.12.6. Moves BUILD_DEPS install step before GO_VERSION which improves intermediate step caching during development. Verified locally with: - docker build --build-arg GO_VERSION=go1.12.6 (and others) - Ran fmt.Println(runtime.Version()) in the playground to verify the version changed. Updates golang/go#32606 Change-Id: Ic57f8a0a3465d7ea3438a31eab5ca90f85333af5 Reviewed-on: https://go-review.googlesource.com/c/playground/+/182180 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org>
This subrepository holds the source for the Go playground: https://play.golang.org/
# build the image docker build -t playground .
docker run --name=play --rm -d -p 8080:8080 playground # run some Go code cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile
Building the playground Docker container takes more than the default 10 minute time limit of cloud build, so increase its timeout first (note, app/cloud_build_timeout
is a global configuration value):
gcloud config set app/cloud_build_timeout 1200 # 20 mins
Alternatively, to avoid Cloud Build and build locally:
make docker docker tag playground:latest gcr.io/golang-org/playground:latest docker push gcr.io/golang-org/playground:latest gcloud --project=golang-org --account=you@google.com app deploy app.yaml --image-url=gcr.io/golang-org/playground:latest
Then:
gcloud --project=golang-org --account=you@google.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.