aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <max@magorsch.de>2019-12-23 03:44:01 +0100
committerMax Magorsch <max@magorsch.de>2019-12-23 03:48:10 +0100
commit92f934a30bdd615f9124c3107325d8884b89941a (patch)
treee5bfb0e458201ba9001de9b5e634eec8fe5a403f
parentbug template: Add a link to clone in same product (diff)
downloadbugzilla-92f934a30bdd615f9124c3107325d8884b89941a.tar.gz
bugzilla-92f934a30bdd615f9124c3107325d8884b89941a.tar.bz2
bugzilla-92f934a30bdd615f9124c3107325d8884b89941a.zip
Add docker files for development purposes
Add a gentoo based docker file for development purposes. Docker compose can be used to get up and running quickly: $ docker-compose up Please keep in mind the file permissions when using the docker image. Signed-off-by: Max Magorsch <max@magorsch.de>
-rw-r--r--Dockerfile40
-rw-r--r--docker-compose.yml12
-rw-r--r--docker_files/bugzilla.conf12
3 files changed, 64 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..c4adc5143
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,40 @@
+FROM gentoo/portage:latest as portage
+FROM gentoo/stage3-amd64
+
+# Need a portage tree to build, use last nights.
+COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
+
+RUN echo "www-servers/apache apache2_modules_version apache2_mpms_prefork" > /etc/portage/package.use/apache
+
+RUN echo "dev-perl/Crypt-SMIME ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/ExtUtils-CChecker ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/GDGraph ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/Chart ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/GD ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/GD-Graph3d ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/XMLRPC-Lite ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/Template-GD ~amd64" >> /etc/portage/package.accept_keywords
+RUN echo "dev-perl/GDTextUtil ~amd64" >> /etc/portage/package.accept_keywords
+
+# Required dependencies
+RUN emerge www-servers/apache dev-perl/CGI dev-perl/TimeDate dev-perl/DateTime dev-perl/DateTime-TimeZone dev-perl/DBI dev-perl/Template-Toolkit dev-perl/Email-Sender dev-perl/Email-MIME dev-perl/URI dev-perl/List-MoreUtils dev-perl/Math-Random-ISAAC dev-perl/JSON-XS dev-perl/Crypt-OpenPGP dev-perl/Crypt-SMIME dev-perl/HTML-Tree dev-perl/DBD-SQLite
+
+# Optional dependencies
+RUN emerge dev-perl/GD dev-perl/Chart dev-perl/Template-GD dev-perl/GDTextUtil dev-perl/GDGraph dev-perl/MIME-tools dev-perl/XML-Twig dev-perl/PatchReader dev-perl/Authen-Radius dev-perl/perl-ldap dev-perl/Authen-SASL dev-perl/SOAP-Lite dev-perl/XMLRPC-Lite dev-perl/JSON-RPC dev-perl/Test-Taint dev-perl/HTML-Scrubber dev-perl/Encode-Detect dev-perl/Email-Reply dev-perl/HTML-FormatText-WithLinks dev-perl/TheSchwartz dev-perl/Daemon-Generic dev-perl/Apache-SizeLimit dev-perl/File-MimeInfo dev-perl/IO-stringy dev-perl/Cache-Memcached dev-perl/File-Copy-Recursive
+RUN emerge dev-util/patchutils
+
+RUN mkdir -p /var/www/localhost/htdocs/bugzilla
+
+COPY . /var/www/localhost/htdocs/bugzilla
+COPY docker_files/bugzilla.conf /etc/apache2/vhosts.d/00_default_vhost.conf
+
+WORKDIR /var/www/localhost/htdocs/bugzilla
+
+RUN usermod -u 1000 apache
+RUN groupmod -g 1000 apache
+
+RUN ./checksetup.pl
+
+CMD ["apache2", "-DFOREGROUND"]
+
+
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..e7c0d445a
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,12 @@
+version: '3'
+services:
+ web:
+ build: .
+ ports:
+ - "8080:80"
+# command: apache2 -DFOREGROUND
+# user: 1000:1000
+ volumes:
+ - .:/var/www/localhost/htdocs/bugzilla
+
+
diff --git a/docker_files/bugzilla.conf b/docker_files/bugzilla.conf
new file mode 100644
index 000000000..08ffa2ec9
--- /dev/null
+++ b/docker_files/bugzilla.conf
@@ -0,0 +1,12 @@
+Listen 80
+<VirtualHost *:80>
+ AddHandler cgi-script .cgi
+ ServerName localhost
+ DocumentRoot "/var/www/localhost/htdocs/bugzilla"
+ <Directory "/var/www/localhost/htdocs/bugzilla">
+ DirectoryIndex index.cgi
+ Options Indexes FollowSymLinks ExecCGI
+ AllowOverride All
+ Require all granted
+ </Directory>
+</VirtualHost>