summaryrefslogtreecommitdiffhomepage
path: root/runsc/test/runtimes/python/Dockerfile
diff options
context:
space:
mode:
authorSamantha Sample <samsample@google.com>2019-07-26 10:56:43 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-26 10:57:53 -0700
commit444a9d9e545f01dc204f1863e91acb8700823c6e (patch)
treea812152214de367be6eebca02b8dee9c218196e1 /runsc/test/runtimes/python/Dockerfile
parent7052d21dc45be8ba5ba82117aedc0cb6ecb7c1b7 (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/python/Dockerfile')
-rw-r--r--runsc/test/runtimes/python/Dockerfile31
1 files changed, 31 insertions, 0 deletions
diff --git a/runsc/test/runtimes/python/Dockerfile b/runsc/test/runtimes/python/Dockerfile
new file mode 100644
index 000000000..811f48f8a
--- /dev/null
+++ b/runsc/test/runtimes/python/Dockerfile
@@ -0,0 +1,31 @@
+FROM ubuntu:bionic
+ENV LANG_VER=3.7.3
+ENV LANG_NAME=Python
+
+RUN apt-get update && apt-get install -y \
+ curl \
+ gcc \
+ libbz2-dev \
+ libffi-dev \
+ liblzma-dev \
+ libreadline-dev \
+ libssl-dev \
+ make \
+ zlib1g-dev
+
+WORKDIR /root
+RUN curl -o go.tar.gz https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
+RUN tar -zxf go.tar.gz
+
+# Use flags -LJO to follow the html redirect and download .tar.gz.
+RUN curl -LJO https://github.com/python/cpython/archive/v${LANG_VER}.tar.gz
+RUN tar -zxf cpython-${LANG_VER}.tar.gz
+ENV LANG_DIR=/root/cpython-${LANG_VER}
+
+WORKDIR ${LANG_DIR}
+RUN ./configure --with-pydebug
+RUN make -s -j2
+
+COPY proctor-python.go ${LANG_DIR}
+
+ENTRYPOINT ["/root/go/bin/go", "run", "proctor-python.go"]