Dockerfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This file is part of GNU Stow.
  2. #
  3. # GNU Stow is free software: you can redistribute it and/or modify it
  4. # under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # GNU Stow is distributed in the hope that it will be useful, but
  9. # WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. # General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see https://www.gnu.org/licenses/.
  15. # Build docker image: `docker build -t stowtest`
  16. # Run tests: (from stow src directory)
  17. # `docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest`
  18. FROM debian:jessie
  19. RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
  20. RUN DEBIAN_FRONTEND=noninteractive \
  21. apt-get update -qq && \
  22. apt-get install -y -q \
  23. autoconf \
  24. bzip2 \
  25. cpanminus \
  26. gawk \
  27. git \
  28. libssl-dev \
  29. make \
  30. patch \
  31. perlbrew \
  32. texinfo \
  33. texlive \
  34. texi2html \
  35. && apt-get clean \
  36. && rm -rf /var/lib/apt/lists/*
  37. # Set up perlbrew
  38. ENV HOME=/root \
  39. PERLBREW_ROOT=/usr/local/perlbrew \
  40. PERLBREW_HOME=/root/.perlbrew \
  41. PERLBREW_PATH=/usr/local/perlbrew/bin
  42. RUN mkdir -p /usr/local/perlbrew /root \
  43. && perlbrew init \
  44. && perlbrew install-cpanm \
  45. && perlbrew install-patchperl
  46. RUN perlbrew install-multiple -j 4 --notest \
  47. perl-5.22.2 \
  48. perl-5.20.3 \
  49. perl-5.18.4 \
  50. perl-5.16.3 \
  51. perl-5.14.4 \
  52. && perlbrew clean
  53. # Bootstrap the perl environments
  54. COPY ./bootstrap-perls.sh /bootstrap-perls.sh
  55. RUN /bootstrap-perls.sh && rm /bootstrap-perls.sh
  56. # Add test script to container filesystem
  57. COPY ./run-stow-tests.sh /run-stow-tests.sh
  58. ENTRYPOINT ["/run-stow-tests.sh"]