summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/go/Dockerfile
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-08-29 13:17:48 -0700
committerNicolas Lacasse <nlacasse@google.com>2019-08-29 14:02:32 -0700
commiteb4aa40342826451a70db5eda137f2731f750607 (patch)
tree9eb565dd744c41e6d24fc62c5f148da3db6bffb7 /test/runtimes/go/Dockerfile
parent31f05d5d4f62c4cd4fe3b95b333d0130aae4b2c1 (diff)
Compile procter binaries during image creation.
Using "go run ..." in the ENTRYPOINT causes the go compiler to run each time the container is started. We can just compile the binary once as part of the image. PiperOrigin-RevId: 266212462
Diffstat (limited to 'test/runtimes/go/Dockerfile')
-rw-r--r--test/runtimes/go/Dockerfile3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/runtimes/go/Dockerfile b/test/runtimes/go/Dockerfile
index 1d5202b70..2d3477392 100644
--- a/test/runtimes/go/Dockerfile
+++ b/test/runtimes/go/Dockerfile
@@ -30,5 +30,6 @@ WORKDIR ${LANG_DIR}
COPY common /root/go/src/gvisor.dev/gvisor/test/runtimes/common/common
COPY go/proctor-go.go ${LANG_DIR}
+RUN ["/root/go/bin/go", "build", "-o", "/root/go/bin/proctor", "proctor-go.go"]
-ENTRYPOINT ["/root/go/bin/go", "run", "proctor-go.go"]
+ENTRYPOINT ["/root/go/bin/proctor"]