-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
45 lines (32 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM harbor.ntppool.org/perlorg/base-os:3.20.2
LABEL org.opencontainers.image.description Colobus NNTP / ezmlm Web Archive publisher
USER root
ENV CBCONFIG=
RUN apk update; apk upgrade apk-tools; apk upgrade; apk add libxml2-dev
ENV CBROOTLOCAL=/cnntp/
ENV CBROOT=/cnntp/combust
WORKDIR /cnntp
EXPOSE 8299
CMD ./run
RUN addgroup cnntp && adduser -D -G cnntp cnntp
# - Alpine is missing some locale stuff so Number::Format fails some
# tests.
# - XML::Atom doesn't like newer XML-LibXML:
# https://github.com/miyagawa/xml-atom/issues/18
# - POSIX::strftime::compiler has weird time zone issues on Alpine 3.12
RUN cpanm --notest \
Number::Format \
XML::Atom \
POSIX::strftime::Compiler
RUN cpanm Email::MIME Captcha::reCAPTCHA \
XML::RSS XML::Atom::Feed XML::Atom::Entry \
Email::Address Net::NNTP Email::Abstract \
DateTime::Locale Template::Plugin::Number::Format \
Starman Plack::Middleware::XForwardedFor \
Plack::Middleware::Options \
Plack::Middleware::AccessLog
ADD . /cnntp
RUN mkdir -p logs; chown cnntp logs
# because quay.io sets timestamps to 1980 for some reason ...
RUN find ./docs -type f -print0 | xargs -0 touch
USER cnntp