Skip to content

Instantly share code, notes, and snippets.

@jsorah
Last active July 10, 2016 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsorah/014aa380e61130d07a5f500ecf70f516 to your computer and use it in GitHub Desktop.
Save jsorah/014aa380e61130d07a5f500ecf70f516 to your computer and use it in GitHub Desktop.
Bugzilla 5 Dockerfile... FML
$answer{'db_host'} = 'localhost';
$answer{'db_driver'} = 'mysql';
$answer{'db_port'} = 0;
$answer{'db_name'} = 'bugs';
$answer{'db_user'} = 'root';
$answer{'db_pass'} = '';
$answer{'ADMIN_EMAIL'} = 'test@example.com';
$answer{'ADMIN_PASSWORD'} = 'testtest';
$answer{'ADMIN_REALNAME'} = 'testymctester';
$answer{'SMTP_SERVER'} = 'smtp.example.com';
$answer{'NO_PAUSE'} = 1;
FROM centos:centos6.6
RUN yum update -y
RUN yum install -y mysql-server wget httpd perl5 tar
# Perl specific stuff.
RUN yum install -y gcc perl-parent perl-CPAN
RUN useradd -ms /bin/bash bugzilla
RUN usermod -a -G apache bugzilla
USER bugzilla
WORKDIR /home/bugzilla
RUN wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.3.tar.gz
RUN tar zxvf bugzilla-5.0.3.tar.gz
WORKDIR /home/bugzilla/bugzilla-5.0.3
RUN ./install-module.pl --all
COPY bugzilla.config /tmp/bugzilla.config
COPY start.sh /tmp/start.sh
USER root
EXPOSE 80
CMD /bin/bash /tmp/start.sh
# TODO Start mysql and httpd and configure default user/pw for bugzilla db in localconfig
#!/bin/sh
/etc/init.d/mysqld start > /dev/null;
cat /tmp/apache.config >> /etc/httpd/conf/httpd.conf
/etc/init.d/httpd start > /dev/null;
su bugzilla -c "/home/bugzilla/bugzilla-5.0.3/checksetup.pl /tmp/bugzilla.config";
su bugzilla -c "/home/bugzilla/bugzilla-5.0.3/checksetup.pl /tmp/bugzilla.config";
cp -r /home/bugzilla/bugzilla-5.0.3/ /var/www/html/bugzilla
chown -R apache /var/www/html/bugzilla
echo "Started"
tail -f /dev/null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment