Public | Automated Build

Last pushed: 9 months ago
Short Description
Docker based Bugzilla development environment
Full Description

Docker Bugzilla

Configure a running Bugzilla system using Docker

Features

  • Running latest Centos
  • Preconfigured with initial data and test product
  • Running Apache2 and MySQL Community Server 5.6
  • Code resides in /var/www/html/bugzilla and can be updated,
    diffed, and branched using standard git commands

How to install Docker

Visit Docker and get Docker up and running on your system. Optionally
you could install Docker Compose
to help with setting up a new container.

How to build Bugzilla Docker image

To build a fresh image, just change to the directory containing the checked out
files and run the below command:

$ docker-compose build

How to start Bugzilla Docker image

To start a new container (or rerun your last container) you simply do:

$ docker-compose up

This will stay in the foreground and you will see the output from supervisord. You
can use the -d option to run the container in the background.

To stop, start or remove the container that was created from the last run, you can do:

$ docker-compose stop
$ docker-compose start
$ docker-compose rm

How to access the Bugzilla container

If you are using Linux, you can simply point your browser to
http://localhost/bugzilla to see the the Bugzilla home page.

The Administrator login is admin and the password is password.
You can use the Administrator account to creat other users, add products or
components, etc.

You can also login to the container using docker exec -it bugzilla-dev su - bugzilla command.
You can run multiple containers but you will need to give each one a different name/hostname
as well as non-conflicting ports numbers for httpd and vnc.

TODO

  • Enable SSL support.
Docker Pull Command
Owner
bugzilla
Source Repository

Comments (2)
kfealey
a year ago

Trying to investigate a little more, but I'm pretty sure that the issue is due to the 5 second sleep timer in bugzilla_config.sh (line 13). I think that is not always enough time to start up MySQL. I recommend increasing that timer to something like 15 seconds.

kfealey
a year ago

This build does not work. Attempting to navigate to bugzilla post-install shows an Internal Server Error in the browser.

I tried to build the image myself and saw some SQL errors during the build process. Further investigation revealed that bugzilla_config.sh either did not run or resulted in a failure, since the "bugs" user had no access to the MySQL database.

I just checked the build output for this image (at https://hub.docker.com/r/bugzilla/bugzilla-dev/builds/bqbnynadqi7gcdzd6bjjw99/) and the following is present:

161101 21:48:30 mysqld_safe Logging to '/var/lib/mysql/mysql-error.log'.
161101 21:48:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
**ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)**

which is a symptom of the same problem.

Further in the build output is:

[91mThere was an error connecting to MySQL:

    Access denied for user 'bugs'@'localhost' (using password: YES)

This might have several reasons:

* MySQL is not running.
* MySQL is running, but there is a problem either in the
  server configuration or the database access rights. Read the Bugzilla
  Guide in the doc directory. The section about database configuration
  should help.
* Your password for the 'bugs' user, specified in $db_pass, is 
  incorrect, in './localconfig'.
* There is a subtle problem with Perl, DBI, or MySQL. Make
  sure all settings in './localconfig' are correct. If all else fails, set
  '$db_check' to 0.

which is also a symptom of the same issue.

As a sanity check, I rebuilt the image:

  docker build --no-cache -t bugzilla/bugzilla-dev .
  docker-compose up -d

and this time I did not see those errors, and Bugzilla was available. Then I started with a clean environment and ran them again - again, with success. I'm not sure what caused the inconsistency, but I suspect it has to do with an existing bugzilla image being on the box doing the building. I think if you don't use the --no-cache flag, and you have done a docker pull bugzilla/bugzilla-dev in the past, the build breaks.

Anyway, I'm up and running from doing my own build, but, please make sure the image hosted by Docker Hub is working - seems like you can't just trust if the build log says "Success".