1 # This file is part of GNU Stow.
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.
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.
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/.
16 # Build docker image: `docker build -t stowtest`
17 # Run tests: (from stow src directory)
18 # `docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest`
20 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
21 RUN DEBIAN_FRONTEND=noninteractive \
22 apt-get update -qq && \
23 apt-get install -y -q \
37 && rm -rf /var/lib/apt/lists/*
41 PERLBREW_ROOT=/usr/local/perlbrew \
42 PERLBREW_HOME=/root/.perlbrew \
43 PERLBREW_PATH=/usr/local/perlbrew/bin
44 RUN mkdir -p /usr/local/perlbrew /root \
46 && perlbrew install-cpanm \
47 && perlbrew install-patchperl
48 RUN perlbrew install-multiple -j 4 --notest \
56 # Bootstrap the perl environments
57 COPY ./bootstrap-perls.sh /bootstrap-perls.sh
58 RUN /bootstrap-perls.sh && rm /bootstrap-perls.sh
60 # Add test script to container filesystem
61 COPY ./run-stow-tests.sh /run-stow-tests.sh
63 ENTRYPOINT ["/run-stow-tests.sh"]