summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/python/Dockerfile
blob: 811f48f8ac6efab77fd0e0a04ebb9576e89234cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"]