diff options
author | Samantha Sample <samsample@google.com> | 2019-07-26 10:56:43 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-26 10:57:53 -0700 |
commit | 444a9d9e545f01dc204f1863e91acb8700823c6e (patch) | |
tree | a812152214de367be6eebca02b8dee9c218196e1 /runsc/test/runtimes/go/Dockerfile | |
parent | 7052d21dc45be8ba5ba82117aedc0cb6ecb7c1b7 (diff) |
Publish Dockerfiles and test-runner binaries for running language tests.
By following the directions in the README file, these Dockerfiles can be
built and used to run native language tests for their respective runtimes.
PiperOrigin-RevId: 260174430
Diffstat (limited to 'runsc/test/runtimes/go/Dockerfile')
-rw-r--r-- | runsc/test/runtimes/go/Dockerfile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/runsc/test/runtimes/go/Dockerfile b/runsc/test/runtimes/go/Dockerfile new file mode 100644 index 000000000..cd55608cd --- /dev/null +++ b/runsc/test/runtimes/go/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:bionic +ENV LANG_VER=1.12.5 +ENV LANG_NAME=Go + +RUN apt-get update && apt-get install -y \ + curl \ + gcc \ + git + +WORKDIR /root + +# Download Go 1.4 to use as a bootstrap for building Go from the source. +RUN curl -o go1.4.linux-amd64.tar.gz https://dl.google.com/go/go1.4.linux-amd64.tar.gz +RUN curl -LJO https://github.com/golang/go/archive/go${LANG_VER}.tar.gz +RUN mkdir bootstr +RUN tar -C bootstr -xzf go1.4.linux-amd64.tar.gz +RUN tar -xzf go-go${LANG_VER}.tar.gz +RUN mv go-go${LANG_VER} go + +ENV GOROOT=/root/go +ENV GOROOT_BOOTSTRAP=/root/bootstr/go +ENV LANG_DIR=${GOROOT} + +WORKDIR ${LANG_DIR}/src +RUN ./make.bash + +WORKDIR ${LANG_DIR} + +COPY proctor-go.go ${LANG_DIR} + +ENTRYPOINT ["/root/go/bin/go", "run", "proctor-go.go"] |