Makefile: fix command to build docker image

Change-Id: I5d67b8a72c55f73383372c5a8a091445791d8212
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/477075
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Maceo Thompson <maceothompson@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/Makefile b/Makefile
index 73652b8..47b411d 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@
 #	gsutil cp go-image.1.19.4.tar.gz gs://go-ecosystem/go-image.tar.gz
 # Then delete the local copy.
 go-image-%.tar.gz:
-	docker create golang:$* | gzip > go-image-$*.tar.gz
+	docker export $(shell docker create golang:$*) | gzip > go-image-$*.tar.gz
 
 # Download the Go vulnerability DB to a local directory, so vulndb can access it
 # from the sandbox, which has no network connectivity.