Get Started with Bugzilla Fast Using Docker
It is now even easier to configure and run a Bugzilla Bug Tracking System using Docker containers.
- Running latest Fedora (20)
- Preconfigured with initial data and test product
- Running Apache2 and MySQL Community Server 5.6
- Openssh running via systemd so you can ssh in to the system to make changes
- Bugzilla code resides in “/home/bugzilla/devel/htdocs/bugzilla” and can be refreshed using standard git commands
- Docker related code can be found on github
Get started with Docker
If you are running a recent flavor of Linux such as Ubuntu or Fedora, it should be as easy installing using your respective package manager. For example with Fedora 20 you can just type
$ sudo yum install docker-io
For Mac OSX, it is a little more involved as OSX does not support the kernel features that Docker uses to create the application containers. So you will need to use VirtualBox to create a Linux VM that the containers will actually run in. More details on getting started here.
How to get it
You can download a pre-built image it from the Docker Registry and just execute it.
$ docker pull dklawren/docker-bugzilla
Or you can build it yourself from scratch and make any changes you need.
$ git clone https://github.com/dklawren/docker-bugzilla $ cd docker-bugzilla $ docker build -rm -t <my_name>/docker-bugzilla .
Running a new container
Since the container is using systemd to start the various services such as sshd, httpd, mysqld, etc. you will need to use “–privileged” and mount “/sys/fs/cgroup” as a read-only volume within the container.
“–privileged” is required systemd requires CAP_SYS_ADMIN capability but Docker drops that capability in the non privileged containers, in order to add more security. This means for now you have to run systemd within a privileged container since privileged containers do not drop any capabilities. This should improve in future Docker releases.
$ docker run -d -t --privileged \ --name bugzilla \ --hostname bugzilla \ --publish 8080:80 \ --publish 2222:22 \ --volume /sys/fs/cgroup:/sys/fs/cgroup:ro \ dklawren/docker-bugzilla
This will pull down the docker image from the Docker Registry (or run the local copy if pulled down before) and start it for you.
To stop and remove the container, you can do:
$ docker stop bugzilla $ docker rm bugzilla
You can point your browser to http://localhost:8080/bugzilla to see the the Bugzilla home page. You can ssh into the container using
$ ssh bugzilla@localhost -p2222
The password is “bugzilla”. The above command that starts the container is also in the “bugzilla_start.sh” file. Once the image is cache locally, starting the container should happen very quickly. 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 ssh and httpd.