-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build also RT stable and master from GitHub repo
- Loading branch information
1 parent
f871075
commit d251446
Showing
15 changed files
with
246 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,20 @@ 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/release/rt-4.4.7.tar.gz \ | ||
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz.asc \ | ||
&& gpg --verify rt.tar.gz.asc rt.tar.gz \ | ||
RUN curl -fsSL -o rt.tar.gz https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz \ | ||
&& if [[ "https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz" =~ ^https://download.bestpractical.com/pub/rt/ ]]; then \ | ||
curl -fsSL -o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz.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-4.4.7 \ | ||
&& ./configure \ | ||
&& cd rt-* \ | ||
&& ./configure.ac \ | ||
--prefix=/opt/rt \ | ||
--enable-developer \ | ||
--enable-externalauth \ | ||
--enable-gd \ | ||
|
@@ -30,17 +31,17 @@ RUN curl -fsSL \ | |
--with-db-type=SQLite \ | ||
--with-web-handler=standalone \ | ||
&& make install \ | ||
&& mkdir --mode=0600 --parents /opt/rt4/var/data/{gpg,smime} \ | ||
&& mkdir --mode=0600 --parents /opt/rt/var/data/{gpg,smime} \ | ||
&& make initialize-database \ | ||
&& cd .. && rm -rf /usr/local/src/* | ||
|
||
WORKDIR /opt/rt4 | ||
WORKDIR /opt/rt | ||
COPY RT_SiteConfig.pm etc/ | ||
|
||
VOLUME /opt/rt4 | ||
VOLUME /opt/rt | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
EXPOSE 80 | ||
CMD ["/opt/rt4/sbin/rt-server"] | ||
CMD ["/opt/rt/sbin/rt-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,20 @@ 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/release/rt-5.0.7.tar.gz \ | ||
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz.asc \ | ||
&& gpg --verify rt.tar.gz.asc rt.tar.gz \ | ||
RUN curl -fsSL -o rt.tar.gz https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz \ | ||
&& if [[ "https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz" =~ ^https://download.bestpractical.com/pub/rt/ ]]; then \ | ||
curl -fsSL -o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz.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-5.0.7 \ | ||
&& ./configure \ | ||
&& cd rt-* \ | ||
&& ./configure.ac \ | ||
--prefix=/opt/rt \ | ||
--enable-developer \ | ||
--enable-externalauth \ | ||
--enable-gd \ | ||
|
@@ -30,17 +31,17 @@ RUN curl -fsSL \ | |
--with-db-type=SQLite \ | ||
--with-web-handler=standalone \ | ||
&& make install \ | ||
&& mkdir --mode=0600 --parents /opt/rt5/var/data/{gpg,smime} \ | ||
&& mkdir --mode=0600 --parents /opt/rt/var/data/{gpg,smime} \ | ||
&& make initialize-database \ | ||
&& cd .. && rm -rf /usr/local/src/* | ||
|
||
WORKDIR /opt/rt5 | ||
WORKDIR /opt/rt | ||
COPY RT_SiteConfig.pm etc/ | ||
|
||
VOLUME /opt/rt5 | ||
VOLUME /opt/rt | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
EXPOSE 80 | ||
CMD ["/opt/rt5/sbin/rt-server"] | ||
CMD ["/opt/rt/sbin/rt-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,21 @@ 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 \ | ||
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-%%RT_VERSION%% \ | ||
&& ./configure \ | ||
&& cd rt-* \ | ||
&& echo "%%RT_VERSION_TAG%%.$(date -I)" > .tag \ | ||
&& ./configure.ac \ | ||
--prefix=/opt/rt \ | ||
--enable-developer \ | ||
--enable-externalauth \ | ||
--enable-gd \ | ||
|
@@ -29,18 +31,19 @@ RUN curl -fsSL \ | |
--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%%RT_VERSION_MAJOR%%/var/data/{gpg,smime} \ | ||
&& mkdir --mode=0600 --parents /opt/rt/var/data/{gpg,smime} \ | ||
&& make initialize-database \ | ||
&& cd .. && rm -rf /usr/local/src/* | ||
|
||
WORKDIR /opt/rt%%RT_VERSION_MAJOR%% | ||
WORKDIR /opt/rt | ||
COPY RT_SiteConfig.pm etc/ | ||
|
||
VOLUME /opt/rt%%RT_VERSION_MAJOR%% | ||
VOLUME /opt/rt | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
EXPOSE 80 | ||
CMD ["/opt/rt%%RT_VERSION_MAJOR%%/sbin/rt-server"] | ||
CMD ["/opt/rt/sbin/rt-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 https://github.com/bestpractical/rt/archive/refs/heads/master.tar.gz \ | ||
&& if [[ "https://github.com/bestpractical/rt/archive/refs/heads/master.tar.gz" =~ ^https://download.bestpractical.com/pub/rt/ ]]; then \ | ||
curl -fsSL -o rt.tar.gz.asc https://github.com/bestpractical/rt/archive/refs/heads/master.tar.gz.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-6.0.master.$(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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use utf8; | ||
|
||
Set($CanonicalizeRedirectURLs, RT_CANONICALIZE_REDIRECT_URLS); | ||
Set($MailCommand, "RT_MAIL_COMMAND"); | ||
Set($WebDomain, "RT_WEB_DOMAIN"); | ||
Set($WebPort, RT_WEB_PORT); | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
: "${RT_CANONICALIZE_REDIRECT_URLS:=0}" | ||
: "${RT_MAIL_COMMAND:=testfile}" | ||
: "${RT_WEB_DOMAIN:=localhost}" | ||
: "${RT_WEB_PORT:=80}" | ||
|
||
: "${RT_ROOT_PASSWORD:=}" | ||
|
||
sed -i \ | ||
-e "s/RT_CANONICALIZE_REDIRECT_URLS/$RT_CANONICALIZE_REDIRECT_URLS/" \ | ||
-e "s/RT_MAIL_COMMAND/$RT_MAIL_COMMAND/" \ | ||
-e "s/RT_WEB_DOMAIN/$RT_WEB_DOMAIN/" \ | ||
-e "s/RT_WEB_PORT/$RT_WEB_PORT/" \ | ||
/opt/rt/etc/RT_SiteConfig.pm | ||
|
||
if [[ -n "${RT_ROOT_PASSWORD}" ]]; then | ||
(echo "${RT_ROOT_PASSWORD}" | /opt/rt/sbin/rt-passwd root) || [[ $? -gt 1 ]] && exit 1 | ||
fi | ||
|
||
exec "$@" |
Oops, something went wrong.