Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created March 8, 2020 16:38
Show Gist options
  • Save jaraco/8f06ec7c5236a8cbbe15bcbd925f35da to your computer and use it in GitHub Desktop.
Save jaraco/8f06ec7c5236a8cbbe15bcbd925f35da to your computer and use it in GitHub Desktop.
FROM ubuntu:xenial
RUN apt update
RUN apt install -y software-properties-common
RUN apt-add-repository -y ppa:deadsnakes/ppa
RUN apt update
RUN apt install -y python3-dev wget python python-dev python-setuptools python3.7-dev virtualenv
RUN adduser --system --disabled-password --uid 2500 --quiet buildbot --home /opt/buildhome
USER buildbot
ENV PIPENV_RUNTIME 2.7
RUN virtualenv -p python2.7 --no-site-packages /opt/buildhome/python2.7 && \
/bin/bash -c 'source /opt/buildhome/python2.7/bin/activate' && \
ln -nfs /opt/buildhome/python2.7 /opt/buildhome/python2.7.11
RUN virtualenv -p python3.5 --no-site-packages /opt/buildhome/python3.5 && \
/bin/bash -c 'source /opt/buildhome/python3.5/bin/activate' && \
ln -nfs /opt/buildhome/python3.5 /opt/buildhome/python3.5.6
RUN virtualenv -p python3.7 --no-site-packages /opt/buildhome/python3.7 && \
/bin/bash -c 'source /opt/buildhome/python3.7/bin/activate' && \
ln -nfs /opt/buildhome/python3.7 /opt/buildhome/python3.7.2
RUN /opt/buildhome/python${PIPENV_RUNTIME}/bin/pip install "setuptools<45"
RUN /opt/buildhome/python${PIPENV_RUNTIME}/bin/pip install pipenv
RUN python3 -V && (wget https://bootstrap.pypa.io/get-pip.py -O - | python3)
CMD python3 -m pip install --use-pep517 tox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment