FROM doseme/perlbase
MAINTAINER DoseMe Pty Ltd, software@doseme.com.au

# Apt sources for buster are now at archive.debian.org
# FIXME: move to perlbase
RUN sed -i 's#deb http://deb.debian.org#deb http://archive.debian.org#g' /etc/apt/sources.list && cat /etc/apt/sources.list && apt-get update

RUN apt-get update && apt-get install -y gsl-bin libgsl23
RUN apt-get update && apt-get install -y libgsl-dev
RUN apt-get update && apt-get -y install expat libexpat-dev

RUN cpanm -v local::lib TAP::Harness::Archive
RUN cpanm -v local::lib TAP::Formatter::JUnit

RUN cpanm -v local::lib TAP::Harness::Archive Dist::Zilla

RUN cpanm -v --installdeps Dist::Zilla::Plugin::VersionFromModule
RUN cpanm -v --notest Dist::Zilla::Plugin::VersionFromModule

RUN cpanm --mirror=https://darkpan.doseme.io --mirror=https://cpan.metacpan.org/ --mirror-only -v Dist::Zilla::PluginBundle::DoseMe~v1.0.0

# Install DPL version that we know compiles with apt-get installed clang (perlbase image)
RUN cpanm -v https://cpan.metacpan.org/authors/id/E/ET/ETJ/PDL-2.021.tar.gz
RUN cpanm --mirror=https://darkpan.doseme.io --mirror=https://cpan.metacpan.org/ --mirror-only --installdeps -v DoseMe::Util

RUN useradd jenkins --uid 112 --groups 65534 --shell /bin/bash --create-home
