Docker image for bugzilla web server
1.0K
Docker image for bugzilla web server.
Container runs as non-root user. This user owns bugzilla process and owns bugzilla files.
To run container next volumes should be mapped:
sudo groupadd -g 1197 bugzilla
useradd -u 1197 -g 1197 -M bugzilla
sudo useradd -r bugzilla
sudo groupmod -g 1197 bugzilla
sudo usermod -u 1197 bugzilla
sudo chmod u+x ./build
sudo ./build bugzilla
cd ~
mkdir conf
sudo chown bugzilla:bugzilla ~/conf
sudo docker run \
--rm \
-v ~/conf:/export \
dshap/bugzilla:5.2 export-assets
sudo mkdir /bugzilla
sudo mkdir /bugzilla/db
sudo mkdir /bugzilla/data
sudo chown -R bugzilla:bugzilla /bugzilla
sudo mkdir /var/log/bugzilla
sudo chown -R bugzilla:bugzilla /var/log/bugzilla
sudo mkdir /var/backups/bugzilla
sudo chown -R bugzilla:bugzilla /var/backups/bugzilla
sudo cp ~/conf/etc/init.d/bugzilla /etc/init.d
sudo chmod a+x /etc/init.d/bugzilla
sudo cp ~/conf/usr/sbin/bugzilla /usr/sbin
sudo chmod a+x /usr/sbin/bugzilla
sudo cp ~/conf/usr/bin/bgutil /usr/bin
sudo chmod a+x /usr/bin/bgutil
sudo rm -rf ~/conf
sudo update-rc.d bugzilla defaults
docker run ... -e DB_ROOT_PASSWORD="<some_password>" ...
docker run ... -e DB_USER_PASSWORD="<some_password>" ...
sudo service bugzilla start
sudo bgutil initialize
sudo service bugzilla restart
sudo service bugzilla (start|stop|status|restart)
sudo bgutil backup <filename>
Backup file /var/backups/bugzilla/<filename>.tar.gz will be created.
sudo bgutil restore <filename>
sudo bgutil bash
Bugzilla web server can be located with another web applications. For example, mercurial, bugzilla, wiki etc can be run as docker containers on the same host. In this case apache server can be used to redirect requests to different docker containers.
sudo a2enmod deflate headers proxy proxy_ajp proxy_balancer proxy_connect proxy_html proxy_http rewrite
<VirtualHost *:80>
...
ProxyPreserveHost On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
...
</VirtualHost>
sudo cp ~/conf/etc/apache2/sites-available/bugzilla.conf /etc/apache2/sites-available
sudo a2ensite bugzilla
sudo service apache2 restart
sudo service bugzilla stop
docker run ... -e DB_ROOT_PASSWORD="<new_password>" ...
sudo service bugzilla start
sudo bgutil change-root-password "<old_password>"
sudo service bugzilla stop
docker run ... -e DB_USER_PASSWORD="<new_password>" ...
sudo service bugzilla start
sudo bgutil change-user-password
Special characters should be escaped:
docker run ... -e DB_ROOT_PASSWORD="pa\$\$word" ...
docker run ... -e DB_USER_PASSWORD="pas\$11" ...
sudo bgutil bash
cd /var/www/html/bugzilla
/usr/bin/perl checksetup.pl
sudo docker run --rm \
--name mariadb104 \
-v /bugzilla/db:/bugzilla/db \
mariadb:10.4 mysqld --user=root --datadir=/bugzilla/db
sudo docker stop mariadb104
sudo crontab -l | { cat; echo "minute hour * * * /usr/bin/bgutil backup <filename>"; echo ""; } | sudo crontab -
Content type
Image
Digest
Size
433.5 MB
Last updated
about 5 years ago
docker pull dshap/bugzilla