-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
38 lines (31 loc) · 1.31 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
FROM bpssysadmin/rt-base-debian:RT-5.0.8-bullseye-20241112
LABEL maintainer="Best Practical Solutions <[email protected]>"
# Valid values are RT branches like 5.0-trunk or version tags like rt-4.4.4
ARG RT_VERSION=5.0-trunk
ARG RT_DB_NAME=rt5
ARG RT_DB_TYPE=mysql
ARG RT_DBA_USER=root
ARG RT_DBA_PASSWORD=password
ARG RT_TEST_DB_HOST=172.17.0.2
ARG RT_TEST_RT_HOST
ENV PATH="/opt/perl/bin:$PATH"
RUN cd /usr/local/src \
&& git clone https://github.com/bestpractical/rt.git \
&& cd rt \
&& git checkout $RT_VERSION \
&& ./configure.ac \
--enable-developer \
--enable-gd \
--enable-graphviz \
--with-db-type="$RT_DB_TYPE" \
--with-db-database="$RT_DB_NAME" \
--with-db-host="$RT_TEST_DB_HOST" \
--with-db-rt-host="${RT_TEST_RT_HOST:-$(ip --oneline address show to 172.16/12 | gawk '{split($4, a, "/"); print a[1] "/255.255.255.0"; exit 0;}')}" \
&& make install \
&& perl -I/opt/rt5/local/lib -I/opt/rt5/lib sbin/rt-setup-database --action init --dba="$RT_DBA_USER" --dba-password="$RT_DBA_PASSWORD" \
&& rm -rf /usr/local/src/*
RUN cpm install --global --no-prebuilt --test --with-all --show-build-log-on-failure Net::Domain::TLD Net::Whois::RIPE Parse::BooleanLogic
ENV RT_DBA_USER="$RT_DBA_USER"
ENV RT_DBA_PASSWORD="$RT_DBA_PASSWORD"
ENV RT_TEST_DEVEL=1
CMD tail -f /dev/null