centos7-rpms-py2 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. FROM registry.centos.org/centos/centos:7
  2. ARG repo=https://pagure.io/pagure.git
  3. ARG branch=master
  4. ENV REPO=$repo
  5. ENV BRANCH=$branch
  6. RUN yum -y install \
  7. epel-release
  8. ADD ./fedora-infra-tags.repo /etc/yum.repos.d/infra-tags.repo
  9. ADD ./fedora-infra-tags-stg.repo /etc/yum.repos.d/infra-tags-stg.repo
  10. RUN yum -y install \
  11. yum-utils \
  12. rpm-build \
  13. python-setuptools \
  14. python-coverage \
  15. python-nose \
  16. python-mock \
  17. python-docutils \
  18. python-enum \
  19. python-flask \
  20. python-flake8 \
  21. python2-pytest-xdist \
  22. redis \
  23. which \
  24. git
  25. # git \
  26. # repoSpanner \
  27. # repoSpanner-bridge
  28. RUN cd / \
  29. && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \
  30. && chmod +x /pagure/dev/containers/runtests_py2.sh
  31. # Install all the requirements from the spec file and replace the macro
  32. # %{python_pkgversion} by empty string which thus installs all the py2
  33. # version of the dependencies.
  34. RUN cd /pagure && \
  35. yum install --enablerepo=epel-testing -y \
  36. `rpmspec -q --requires /pagure/files/pagure.spec | \
  37. sed -e "s|%{python_pkgversion}||"` && \
  38. yum clean all && \
  39. localedef -i en_US -f UTF-8 en_US.UTF-8
  40. # The old version of setuptools in CentOS7 does not support restrictions on
  41. # the requirements file, so drop them
  42. RUN \
  43. sed -i -e "s|;python_version<\"3.4\"||" /pagure/requirements.txt && \
  44. sed -i -e "s|;python_version<=\"2.7\"||" /pagure/requirements.txt && \
  45. sed -i -e "s|python3-openid;python_version>=\"3.0\"||" \
  46. /pagure/requirements.txt && \
  47. sed -i "/^email_validator.*/d" /pagure/requirements.txt && \
  48. sed -i -e 's|"alembic-3"|"alembic"|' /pagure/tests/test_alembic.py && \
  49. cd /pagure && python setup.py build
  50. WORKDIR /pagure
  51. ENTRYPOINT ["/pagure/dev/containers/runtests_py2.sh"]
  52. CMD []