This commit is contained in:
STAM 2020-05-19 22:36:10 +03:00
parent 16f646c1f5
commit 85731914e9
10 changed files with 173 additions and 11 deletions

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG BITBUCKET_VERSION=7.2.0
ARG BITBUCKET_VERSION=7.2.3
ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz
##################################################################

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG BITBUCKET_VERSION=7.2.0
ARG BITBUCKET_VERSION=7.2.3
ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz
##################################################################

View File

@ -1,14 +1,16 @@
#main
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
deb http://ftp.ru.debian.org/debian/ testing-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ testing-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ testing-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ testing-proposed-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ bullseye main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ bullseye main contrib non-free
deb http://ftp.ru.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ bullseye-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ bullseye-backports main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ bullseye-backports main contrib non-free
deb http://ftp.ru.debian.org/debian/ bullseye-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ bullseye-proposed-updates main contrib non-free
#security
deb http://ftp.ru.debian.org/debian-security/ testing-security main contrib non-free
deb-src http://ftp.ru.debian.org/debian-security/ testing-security main contrib non-free
deb http://ftp.ru.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://ftp.ru.debian.org/debian-security/ bullseye-security main contrib non-free
##multimedia
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free

View File

@ -15,7 +15,7 @@ RUN for i in $(seq 1 8); do mkdir -p "/usr/share/man/man${i}"; done
##################################################################
# perforce client binary
##################################################################
ARG P4_VERSION=r19.2
ARG P4_VERSION=r20.1
ARG P4_DOWNLOAD_URL=http://www.perforce.com/downloads/perforce/${P4_VERSION}/bin.linux26x86_64/p4
@ -33,6 +33,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
cmatrix \
cmatrix-xfont \
console-cyrillic \
cron \
curl \
ffmpeg \
fontconfig \

View File

@ -3,6 +3,8 @@ deb http://ftp.ru.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-backports main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-backports main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-proposed-updates main contrib non-free

View File

@ -0,0 +1,89 @@
FROM epicmorg/websites:php7.2
ARG ARG_URL=https://secure.gurock.com/downloads/testrail/testrail-latest-ion71.zip
ENV TR_DEFAULT_TASK_EXECUTION=60
ENV TR_CONFIGPATH="/opt/www/testrail/config/"
ENV TR_DEFAULT_LOG_DIR="/opt/testrail/logs/"
ENV TR_DEFAULT_AUDIT_DIR="/opt/testrail/audit/"
ENV TR_DEFAULT_REPORT_DIR="/opt/testrail/reports/"
ENV TR_DEFAULT_ATTACHMENT_DIR="/opt/testrail/attachments/"
ENV OPENSSL_CONF=/etc/ssl/
LABEL vendor="TestRail" \
maintainer="Christian Breitwieser" \
email="cbreitwieser@ranorex.com" \
type="TestRail php-fpm apache image including ionCube loader." \
description="This is an image which runs apache php-fpm with ionCube for testrail."
RUN wget --no-check-certificate -O /tmp/testrail.zip ${ARG_URL} && \
mkdir -p /var/www/testrail && \
mkdir -p /opt/testrail/attachments /opt/testrail/reports /opt/testrail/logs /opt/testrail/audit /opt/www/testrail && \
unzip /tmp/testrail.zip -d /opt/www/ && \
rm /tmp/testrail.zip && \
chown -R www-data:www-data /opt/www/testrail && \
chown -R www-data:www-data /opt/testrail
RUN echo "opcache.enable=1" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/fpm/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/apache2/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/cgi/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/cli/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/fpm/php.ini && \
php -v
COPY testrail.conf /etc/apache2/sites-enabled/testrail.conf
##################################################################
# cleaninig up
##################################################################
RUN apt clean -y && \
apt autoclean -y && \
rm -rfv /etc/apache2/sites-enabled/000-default.conf && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /var/cache/apt/archives/*.deb && \
rm -rfv /tmp/deb/* && \
rm -rfv /tmp/composer-setup.php && \
rm -rfv /tmp/ioncube.tar.gz
#volumes
#VOLUME ["/var/www/"]
# Add image configuration and scripts
COPY run.sh /run.sh
RUN chmod 755 /*.sh
# Configure application
EXPOSE 80
WORKDIR /opt//www/testrail
CMD ["/run.sh"]

6
testrail/latest/Makefile Normal file
View File

@ -0,0 +1,6 @@
all: bitbucket
bitbucket:
docker build --compress -t epicmorg/testrail .
docker push epicmorg/testrail

13
testrail/latest/README.md Normal file
View File

@ -0,0 +1,13 @@
# Testrail Apache PHP-FPM image
To be extendeded...
## How to build the image?
The build supports `ARG_PHP_VERSION`, `ARG_IONCUBE_VERSION`, and `ARG_URL` as arguments as shown below.
```
docker build --build-arg ARG_PHP_VERSION=7.2 --build-arg ARG_IONCUBE_VERSION=10.3.9 --build-arg ARG_URL='https://secure.gurock.com/downloads/testrail/testrail-latest-ion70.zip' -t testrail/apache:6.0 .
```
__Please note:__ When proving a custom zip-file, ensure that it also fits the php-version provided!

40
testrail/latest/run.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
#set -e
function createOptDirectory {
if [ ! -d $1 ]
then
echo "Creating " $1
mkdir -p $1
fi
chown -R www-data:www-data $1
}
createOptDirectory $TR_DEFAULT_LOG_DIR
createOptDirectory $TR_DEFAULT_AUDIT_DIR
createOptDirectory $TR_DEFAULT_REPORT_DIR
createOptDirectory $TR_DEFAULT_ATTACHMENT_DIR
echo "##############"
echo "Waiting for background task file"
while [ ! -f /var/www/testrail/task.php ]
do
sleep 2
done
echo "Starting background task"
while /bin/true; do
php /var/www/testrail/task.php || true
sleep $TR_DEFAULT_TASK_EXECUTION
done &
echo "##############"
rm -rfv /etc/apache2/sites-enabled/000-default.conf
chown -R www-data:www-data /var/www
chown -R www-data:www-data /var/www/testrail/config
source /etc/apache2/envvars
tail -F /var/log/apache2/* &
exec apache2 -D FOREGROUND

View File

@ -0,0 +1,9 @@
<VirtualHost *:80>
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /opt/www/testrail
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>