-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile.template
46 lines (37 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
#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"]
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys C49B372F2BF84A19011660270DF0A283FEAC80B2 \
&& gpg --list-keys
WORKDIR /usr/local/src
# hadolint ignore=DL3003,SC2174
RUN curl -fsSL \
-o rt.tar.gz https://download.bestpractical.com/pub/rt/%%RT_RELEASE%%/rt-%%RT_VERSION%%.tar.gz \
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/%%RT_RELEASE%%/rt-%%RT_VERSION%%.tar.gz.asc \
&& gpg --verify rt.tar.gz.asc rt.tar.gz \
&& tar -xzf rt.tar.gz \
&& cd rt-%%RT_VERSION%% \
&& ./configure \
--enable-developer \
--enable-externalauth \
--enable-gd \
--enable-gpg \
--enable-graphviz \
--enable-smime \
--with-db-type=SQLite \
--with-web-handler=standalone \
&& make install \
&& mkdir --mode=0600 --parents /opt/rt%%RT_VERSION_MAJOR%%/var/data/{gpg,smime} \
&& make initialize-database \
&& cd .. && rm -rf /usr/local/src/*
WORKDIR /opt/rt%%RT_VERSION_MAJOR%%
COPY RT_SiteConfig.pm etc/
VOLUME /opt/rt%%RT_VERSION_MAJOR%%
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 80
CMD ["/opt/rt%%RT_VERSION_MAJOR%%/sbin/rt-server"]