diff options
author | David Lawrence <dkl@mozilla.com> | 2015-04-20 16:53:51 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-04-20 17:45:55 +0200 |
commit | 1cc7a1525eb67f3573b0232e2724fe6afd5ed7f3 (patch) | |
tree | 05a8dee7c94a5c790bf2f3f95d0a8018bb2dfc06 /contrib/docker/Dockerfile | |
parent | 58cccce026440fb4284da40cf0fadc41ad9a31e4 (diff) | |
download | bugzilla-1cc7a1525eb67f3573b0232e2724fe6afd5ed7f3.tar.gz bugzilla-1cc7a1525eb67f3573b0232e2724fe6afd5ed7f3.tar.xz |
Sync contrib/docker/* with upstream docker-bugzilla:bmo
Diffstat (limited to 'contrib/docker/Dockerfile')
-rw-r--r-- | contrib/docker/Dockerfile | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 6a21471b6..bf5caa286 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -3,24 +3,34 @@ MAINTAINER David Lawrence <dkl@mozilla.com> ADD CLOBBER /CLOBBER -# Environment +# Environment configuration ENV container docker +ENV BUGS_DB_DRIVER mysql +ENV BUGS_DB_NAME bugs +ENV BUGS_DB_PASS bugs +ENV BUGS_DB_HOST localhost + ENV BUGZILLA_USER bugzilla -ENV BUGZILLA_REPO https://git.mozilla.org/webtools/bmo/bugzilla.git -ENV BUGZILLA_BRANCH master ENV BUGZILLA_HOME /home/$BUGZILLA_USER/devel/htdocs/bmo +ENV BUGZILLA_URL http://localhost/bmo + +ENV GITHUB_BASE_GIT https://github.com/mozilla/webtools-bmo-bugzilla +ENV GITHUB_BASE_BRANCH master +ENV GITHUB_QA_GIT https://github.com/mozilla/webtools-bmo-qa + +ENV ADMIN_EMAIL admin@mozilla.bugs +ENV ADMIN_PASS password +ENV TEST_SUITE sanity ENV CPANM cpanm --quiet --notest --skip-satisfied # Software installation +RUN yum -y -q update && yum clean all +ADD rpm_list /rpm_list RUN yum -y -q install https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm \ && yum clean all RUN yum -y -q install epel-release \ && yum clean all -RUN yum -y -q install supervisor mod_perl mod_perl-devel openssh-server openssh \ - passwd mysql-community-server mysql-community-devel git sudo perl-App-cpanminus \ - tar gcc gcc-c++ make unzip mpfr-devel vim-enhanced openssl-devel gmp-devel \ - gd-devel postfix graphviz ImageMagick-devel patch aspell-devel perl-CPAN \ - && yum clean all +RUN yum -y -q install `cat /rpm_list` && yum clean all # User configuration RUN useradd -m -G wheel -u 1000 -s /bin/bash $BUGZILLA_USER @@ -49,24 +59,23 @@ ADD sudoers /etc/sudoers RUN chown root.root /etc/sudoers; chmod 440 /etc/sudoers # Clone the code repo -RUN su $BUGZILLA_USER -c "git clone $BUGZILLA_REPO -b $BUGZILLA_BRANCH $BUGZILLA_HOME" +RUN su $BUGZILLA_USER -c "git clone $GITHUB_BASE_GIT -b $GITHUB_BASE_BRANCH $BUGZILLA_HOME" # Install Perl dependencies # Some modules are explicitly installed due to strange dependency issues -RUN cd $BUGZILLA_HOME \ - && $CPANM DBD::mysql \ - && $CPANM HTML::TreeBuilder \ - && $CPANM HTML::FormatText \ - && $CPANM Apache2::SizeLimit \ - && $CPANM Software::License \ +RUN $CPANM Email::MIME::Attachment::Stripper \ + && $CPANM File::Slurp \ && $CPANM Image::Magick@6.77 \ - && $CPANM Fatal \ - && $CPANM XMLRPC::Lite \ - && $CPANM Email::Sender \ - && $CPANM Net::SMTP::SSL \ - && $CPANM HTML::FormatText::WithLinks \ - && $CPANM Text::Markdown \ - && $CPANM --installdeps --with-recommends . + && $CPANM JSON::RPC \ + && $CPANM MIME::Parser \ + && $CPANM Template::Plugin::GD::Image \ + && $CPANM Test::WWW::Selenium + && $CPANM TheSchwartz \ + && $CPANM XMLRPC::Lite +RUN cd $BUGZILLA_HOME \ + && ./checksetup.pl --cpanfile \ + && $CPANM --installdeps --with-recommends --with-all-features \ + --without-feature oracle --without-feature sqlite --without-feature pg . # Bugzilla configuration ADD checksetup_answers.txt /checksetup_answers.txt @@ -89,6 +98,15 @@ RUN echo "NETWORKING=yes" > /etc/sysconfig/network EXPOSE 80 EXPOSE 22 +# Testing script for CI +RUN wget https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar \ + -O /selenium-server.jar +RUN wget https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step \ + -O /buildbot_step +RUN chmod 755 /buildbot_step +ADD runtests.sh /runtests.sh +RUN chmod 755 /runtests.sh + # Supervisor ADD supervisord.conf /etc/supervisord.conf RUN chmod 700 /etc/supervisord.conf |