playground: correct ARG scoping in Dockerfile

ARG is scoped to the build context. In order for it to be global in a
Dockerfile, it needs to happen before any FROM statement.

Updates golang/go#25224

Change-Id: Iea38d04e36f54a416e21c2e42ac88c03f2db057d
Reviewed-on: https://go-review.googlesource.com/c/playground/+/227589
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
diff --git a/Dockerfile b/Dockerfile
index ef02200..97d9a28 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+ARG GO_VERSION=go1.14.1
+
 ############################################################################
 FROM debian:buster AS nacl
 
@@ -20,7 +22,6 @@
 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
 ENV GOROOT_BOOTSTRAP /usr/local/gobootstrap
 ENV GO_BOOTSTRAP_VERSION go1.13.9
-ARG GO_VERSION=go1.14.1
 ENV GO_VERSION ${GO_VERSION}
 
 # Fake time
@@ -74,6 +75,8 @@
 ENV BUILD_DEPS 'curl git gcc patch libc6-dev ca-certificates'
 RUN apt-get update && apt-get install -y --no-install-recommends ${BUILD_DEPS}
 
+ARG GO_VERSION
+ENV GO_VERSION ${GO_VERSION}
 RUN cd /usr/local && git clone https://go.googlesource.com/go go1.14 && cd go1.14 && git reset --hard $GO_VERSION
 WORKDIR /usr/local/go1.14/src
 RUN ./make.bash