-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathDockerfile.template
49 lines (41 loc) · 1.48 KB
/
Dockerfile.template
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
45
46
47
48
49
#checkov:skip=CKV_DOCKER_2:Ensure that HEALTHCHECK instructions have been added to container images
#checkov:skip=CKV_DOCKER_3:Ensure that a user for the container has been created
ARG IMAGE=netsandbox/request-tracker-base
ARG TAG=latest
FROM ${IMAGE}:${TAG}
LABEL org.opencontainers.image.authors="Christian Loos <[email protected]>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /usr/local/src
# hadolint ignore=DL3003,SC2174
RUN curl -fsSL -o rt.tar.gz %%RT_URL%% \
&& if [[ "%%RT_URL%%" =~ ^https://download.bestpractical.com/pub/rt/ ]]; then \
curl -fsSL -o rt.tar.gz.asc %%RT_URL%%.asc; \
gpg --keyserver keyserver.ubuntu.com --recv-keys C49B372F2BF84A19011660270DF0A283FEAC80B2; \
gpg --list-keys; \
gpg --verify rt.tar.gz.asc rt.tar.gz; \
fi \
&& tar -xzf rt.tar.gz \
&& cd rt-* \
&& echo "%%RT_VERSION_TAG%%.$(date -I)" > .tag \
&& ./configure.ac \
--prefix=/opt/rt \
--enable-developer \
--enable-externalauth \
--enable-gd \
--enable-gpg \
--enable-graphviz \
--enable-smime \
--with-db-type=SQLite \
--with-web-handler=standalone \
&& RT_FIX_DEPS_CMD=cpanm make fixdeps && rm -rf /root/.cpanm \
&& make install \
&& mkdir --mode=0600 --parents /opt/rt/var/data/{gpg,smime} \
&& make initialize-database \
&& cd .. && rm -rf /usr/local/src/*
WORKDIR /opt/rt
COPY RT_SiteConfig.pm etc/
VOLUME /opt/rt
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 80
CMD ["/opt/rt/sbin/rt-server"]