Sign inSign up

rekiba/bugzilla

By rekiba

Updated about 2 years ago

Ready-to-use Bugzilla with Apache and easy config scripts. Quick setup for bug tracking

Image
Web servers
1

377

rekiba/bugzilla repository overview

Complete Bugzilla Docker Setup and Usage Guide

Table of Contents

  1. Introduction

  2. Image Features

  3. Prerequisites

  4. Setup Instructions

    4.1 Pull the Docker Image

    4.2 Prepare Configuration Files

    4.3 Choose SSL Configuration

    4.4 Run the Docker Container

    4.5 Access Bugzilla

  5. Custom Scripts

  6. Customization

  7. Troubleshooting

  8. Security Considerations

  9. Additional Notes

1. Introduction

This guide provides comprehensive instructions for setting up and using the docker.io/rekiba/bugzilla Docker image. This image offers a quick and easy way to deploy a Bugzilla instance with Apache web server.

2. Image Features

  • Based on the latest Bugzilla version
  • Pre-configured Apache web server with SSL support
  • Supports custom domain configuration
  • Flexible SSL configuration (can be used for simple setups or removed if not needed)
  • Custom scripts for easy configuration of email settings and user management

3. Prerequisites

  • Docker installed on your system
  • Basic understanding of Docker commands
  • (Optional) A domain name for your Bugzilla instance
  • (Optional) SSL certificate and key if using HTTPS

4. Setup Instructions

4.1 Pull the Docker Image
docker pull docker.io/rekiba/bugzilla:latest
4.2 Prepare Configuration Files

a. Create a localconfig file:

# This is the local configuration file for Bugzilla.

$create_htaccess = 1;
$webservergroup = 'apache';
$canonical_urlbase = 'https://your-domain.com';
$use_suexec = 0;
$db_driver = 'pg';
$db_host = 'your-db-host';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'your-secure-password';
$db_port = 5432;
$db_sock = '';
$db_check = 1;
$db_mysql_ssl_ca_file = '';
$db_mysql_ssl_ca_path = '';
$db_mysql_ssl_client_cert = '';
$db_mysql_ssl_client_key = '';
$index_html = 0;
$interdiffbin = '/usr/bin/interdiff';
$diffpath = '/usr/bin';
$site_wide_secret = 'your-secret-key';

Replace placeholders with your actual configuration.

4.3 Choose SSL Configuration

a. To use the default SSL configuration:

Create a bugzilla_ssl.conf file:

<VirtualHost *:443>
    DocumentRoot /var/www/html/bugzilla
    ServerName your-domain.com
    SSLEngine on
    SSLCertificateFile /path/to/your/certificate.crt
    SSLCertificateKeyFile /path/to/your/private.key
    <Directory /var/www/html/bugzilla>
        AddHandler cgi-script .cgi
        Options +ExecCGI
        DirectoryIndex index.cgi
        AllowOverride All
    </Directory>
</VirtualHost>

b. To remove SSL configuration:

Create a new Dockerfile:

FROM docker.io/rekiba/bugzilla:latest

# Remove the ssl configuration
RUN rm -rf /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.modules.d/00-ssl.conf

# Set up Apache configuration for HTTP
COPY bugzilla.conf /etc/httpd/conf.d/bugzilla.conf

Create a bugzilla.conf file for HTTP:

<VirtualHost *:80>
    DocumentRoot /var/www/html/bugzilla
    ServerName your-domain.com
    <Directory /var/www/html/bugzilla>
        AddHandler cgi-script .cgi
        Options +ExecCGI
        DirectoryIndex index.cgi
        AllowOverride All
    </Directory>
</VirtualHost>
4.4 Run the Docker Container

For SSL setup:

docker run -d \
  --name my-bugzilla \
  -p 443:443 \
  -e BUGZILLA_HOST=your-domain.com \
  -v /path/to/your/localconfig:/var/www/html/bugzilla/localconfig \
  -v /path/to/your/bugzilla_ssl.conf:/etc/httpd/conf.d/bugzilla_ssl.conf \
  -v /path/to/your/certificate.crt:/path/to/your/certificate.crt \
  -v /path/to/your/private.key:/path/to/your/private.key \
  docker.io/rekiba/bugzilla:latest

For non-SSL setup (after building your custom Dockerfile):

docker build -t my-bugzilla-no-ssl .
docker run -d \
  --name my-bugzilla \
  -p 80:80 \
  -e BUGZILLA_HOST=your-domain.com \
  -v /path/to/your/localconfig:/var/www/html/bugzilla/localconfig \
  my-bugzilla-no-ssl
4.5 Access Bugzilla

For SSL setup, navigate to https://your-domain.com. For non-SSL setup, navigate to http://your-domain.com or http://localhost if running locally.

5. Custom Scripts

The following scripts are available in /var/www/html/bugzilla/scripts:

config_smtp_email.pl

Configures SMTP email settings:

docker exec -it my-bugzilla /bin/bash -c "cd /var/www/html/bugzilla && \
perl scripts/config_smtp_email.pl \
[email protected] \
--server=smtp.example.com \
--port=587 \
--username=your-smtp-username \
--password=your-smtp-password \
--ssl=1"
create_admin_user.pl

Creates an administrative user:

docker exec -it my-bugzilla /bin/bash -c "cd /var/www/html/bugzilla && \
perl scripts/create_admin_user.pl \
[email protected] \
--name='Admin User' \
--password=your-secure-password"
get_email_config.pl

Retrieves current email configuration:

docker exec -it my-bugzilla /bin/bash -c "cd /var/www/html/bugzilla && \
perl scripts/get_email_config.pl"

After running these scripts, restart Apache:

docker exec -it my-bugzilla /bin/bash -c "service httpd restart"

6. Customization

  • Modify localconfig for Bugzilla settings.
  • Adjust Apache configuration for web server settings.
  • Create a new Dockerfile based on this image for extensive changes.

7. Troubleshooting

  • Check container logs: docker logs my-bugzilla
  • Verify port availability (80 for HTTP, 443 for HTTPS)
  • For internal container access:
    docker exec -it my-bugzilla /bin/bash
    
    Then navigate to /var/www/html/bugzilla

8. Security Considerations

  • Use HTTPS for production environments.
  • Regularly update the Docker image and Bugzilla installation.
  • Use strong, unique passwords.
  • Implement proper network security measures.

9. Additional Notes

  • The image supports both SSL and non-SSL setups.
  • Ensure valid SSL certificates when using HTTPS.
  • Set BUGZILLA_HOST correctly to suppress Apache warnings.

For the latest information and advanced configuration options, refer to the official Bugzilla documentation.

Tag summary

Content type

Image

Digest

sha256:f4488257e

Size

553.5 MB

Last updated

about 2 years ago

docker pull rekiba/bugzilla