-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
43 lines (36 loc) · 1.49 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
FROM ghcr.io/darkpixel/request-tracker-docker-base/request-tracker-docker-base:0.9.8
LABEL maintainer="Aaron C. de Bruyn <[email protected]>"
WORKDIR /opt/src/rt/
RUN curl -sLS "https://download.bestpractical.com/pub/rt/release/rt-5.0.3.tar.gz" | tar --strip-components=1 -xvzf - \
&& ./configure --enable-graphviz --enable-gd --with-db-type=Pg --with-db-host=database --enable-externalauth \
&& make testdeps && make install
WORKDIR /opt/src/rtir/
RUN curl -sLS "https://download.bestpractical.com/pub/rt/release/RT-IR-5.0.3.tar.gz" | tar --strip-components=1 -xvzf - \
&& perl Makefile.PL && make install
RUN PERL_MM_USE_DEFAULT=1 cpan install \
RT::Extension::Gravatar \
RT::Extension::MergeUsers \
RT::Extension::Announce \
RT::Extension::TicketLocking \
RT::Extension::QuickCalls \
RT::Extension::ShowTransactionSquelching \
RT::Extension::ActivityReports \
RT::Extension::RepliesToResolved \
&& rm -rf /root/.cpan
RUN c_rehash /usr/share/ca-certificates/mozilla
COPY RT_SiteConfig.pm /tmp/RT_SiteConfig.pm
COPY msmtprc /tmp/msmtprc
COPY fetchmailrc /tmp/fetchmailrc
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY msmtp-sendmail.sh /usr/local/bin/msmtp-sendmail.sh
WORKDIR /opt/rt5
RUN adduser -D -h /opt/rt5 -s /bin/sh -u 1000 rtuser
RUN chown -R rtuser /opt/rt5
RUN chown -R rtuser /opt/src
RUN touch /etc/msmtprc
RUN touch /etc/fetchmailrc
RUN chown -R rtuser /etc/msmtprc
RUN chown -R rtuser /etc/fetchmailrc
USER rtuser:rtuser
EXPOSE 80
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint.sh"]