FROM alpine RUN apk update && apk add --no-cache tini bash perl-dev perl-test-leaktrace perl-yaml perl-yaml-tiny perl-moose \ perl-datetime perl-text-markdown perl-text-template perl-html-template \ perl-app-cpanminus perl-module-build perl-test-requires perl-params-validate \ perl-data-printer perl-data-page perl-log-log4perl perl-yaml-libyaml \ perl-plack perl-path-tiny perl-template-toolkit perl-html-parser perl-xml-parser \ perl-capture-tiny perl-test-needs perl-moosex perl-data-dump perl-module-build-xsutil \ perl-net-ssleay perl-xml-libxml perl-io-socket-ssl perl-alien-libxml2 perl-xml-xpath \ perl-xml-rss perl-timedate perl-time-hires perl-test-mocktime-hires perl-test-mocktime \ perl-datetime-format-strptime perl-datetime-format-iso8601 perl-datetime-hires\ perl-text-bibtex perl-mouse perl-mailtools make gcc musl-dev # Devel::PPPort wont install RUN cpanm install Text::Xslate || cat /root/.cpanm/work/*/build.log RUN cpanm install HiD --force || true RUN cpanm install HiD::Generator::BibtexPage ADD scripts/plugin.sh /plugin.sh RUN chmod +x /plugin.sh # add a user for running imapfilter in the container RUN addgroup hid && adduser -D -G hid hid # run everything as the hid user USER hid ENTRYPOINT ["/sbin/tini", "--", "/plugin.sh"]