diff options
author | Mike Crute <mike@crute.us> | 2023-11-21 21:19:38 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2023-11-21 21:19:38 -0800 |
commit | a6dcbdda8fb66393be7e12bd3a90b77c203987d1 (patch) | |
tree | 5be553d205eb689837f6a7972e46880c73681421 /bugzilla/Dockerfile | |
parent | aad62a8b259005cb8353d6a7b4a3f60c85803d1f (diff) | |
download | dockerfiles-a6dcbdda8fb66393be7e12bd3a90b77c203987d1.tar.bz2 dockerfiles-a6dcbdda8fb66393be7e12bd3a90b77c203987d1.tar.xz dockerfiles-a6dcbdda8fb66393be7e12bd3a90b77c203987d1.zip |
Remove old builds
Diffstat (limited to 'bugzilla/Dockerfile')
-rw-r--r-- | bugzilla/Dockerfile | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/bugzilla/Dockerfile b/bugzilla/Dockerfile deleted file mode 100644 index 8ebf911..0000000 --- a/bugzilla/Dockerfile +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | FROM ubuntu:16.04 | ||
2 | MAINTAINER Michael Crute <mike@crute.us> | ||
3 | ARG bz_version | ||
4 | |||
5 | ADD binaries/ /tmp/ | ||
6 | ADD patches/ /tmp/ | ||
7 | |||
8 | RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
9 | echo 'Acquire::http::Proxy "http://genesis.sea1.crute.me:3142";' > /etc/apt/apt.conf && \ | ||
10 | apt-get update && \ | ||
11 | |||
12 | # Perl needs the UTF-8 locale | ||
13 | apt-get install -y locales && \ | ||
14 | locale-gen en_US.UTF-8 && \ | ||
15 | |||
16 | # Install system dependencies | ||
17 | apt-get install -y \ | ||
18 | cron \ | ||
19 | nginx \ | ||
20 | patch \ | ||
21 | python-boto3 \ | ||
22 | runit \ | ||
23 | sudo \ | ||
24 | syslog-ng \ | ||
25 | && \ | ||
26 | |||
27 | # Install Bugzilla dependencies | ||
28 | apt-get install -y \ | ||
29 | graphviz \ | ||
30 | libappconfig-perl \ | ||
31 | libauthen-radius-perl \ | ||
32 | libauthen-sasl-perl \ | ||
33 | libcache-memcached-fast-perl \ | ||
34 | libcgi-pm-perl \ | ||
35 | libchart-perl \ | ||
36 | libdaemon-generic-perl \ | ||
37 | libdate-calc-perl \ | ||
38 | libdatetime-perl \ | ||
39 | libdatetime-timezone-perl \ | ||
40 | libdbd-mysql-perl \ | ||
41 | libdbd-sqlite3-perl \ | ||
42 | libdbi-perl \ | ||
43 | libemail-mime-perl \ | ||
44 | libemail-reply-perl \ | ||
45 | libemail-sender-perl \ | ||
46 | libencode-detect-perl \ | ||
47 | libfile-copy-recursive-perl \ | ||
48 | libfile-mimeinfo-perl \ | ||
49 | libfile-slurp-perl \ | ||
50 | libfile-which-perl \ | ||
51 | libgd-graph-perl \ | ||
52 | libhtml-formattext-withlinks-perl \ | ||
53 | libhtml-scrubber-perl \ | ||
54 | libjson-rpc-perl \ | ||
55 | libmath-random-isaac-perl \ | ||
56 | libmath-random-isaac-xs-perl \ | ||
57 | libmime-tools-perl \ | ||
58 | libmodule-build-perl \ | ||
59 | libmoox-strictconstructor-perl \ | ||
60 | libnet-ldap-perl \ | ||
61 | libplack-perl \ | ||
62 | libsoap-lite-perl \ | ||
63 | libtemplate-perl \ | ||
64 | libtemplate-plugin-gd-perl \ | ||
65 | libtest-taint-perl \ | ||
66 | libtext-multimarkdown-perl \ | ||
67 | libtheschwartz-perl \ | ||
68 | liburi-db-perl \ | ||
69 | libxml-perl \ | ||
70 | libxml-twig-perl \ | ||
71 | perlmagick \ | ||
72 | python-sphinx \ | ||
73 | rst2pdf \ | ||
74 | && \ | ||
75 | |||
76 | dpkg -i /tmp/libpatchreader-perl_0.9.6-1_all.deb && \ | ||
77 | dpkg -i /tmp/libtheschwartz-perl_1.12-1_all.deb && \ | ||
78 | |||
79 | # Setup users and groups | ||
80 | groupadd -g 901 bugzilla && \ | ||
81 | usermod -a -G bugzilla www-data && \ | ||
82 | useradd -d /var/www/html/bugzilla -M -N -g bugzilla -G www-data -s /bin/bash -u 901 bugzilla && \ | ||
83 | |||
84 | # Setup bugzilla app | ||
85 | curl -L -o "/tmp/release-${bz_version}.tar.gz" "https://github.com/bugzilla/bugzilla/archive/release-${bz_version}.tar.gz" && \ | ||
86 | mkdir -p /var/www/html && \ | ||
87 | tar -C /var/www/html/ -xvzf /tmp/release-${bz_version}.tar.gz && \ | ||
88 | ln -s /var/www/html/bugzilla-release-${bz_version} /var/www/html/bugzilla && \ | ||
89 | tar -C /var/www/html/bugzilla/skins/contrib/ -xvzf /tmp/Bright-Skin.tar.gz && \ | ||
90 | rm /etc/nginx/sites-enabled/default && \ | ||
91 | ln -s /etc/nginx/sites-available/bugzilla /etc/nginx/sites-enabled/bugzilla && \ | ||
92 | |||
93 | # Run the initial setup | ||
94 | # | ||
95 | # The bugzilla user must have permissions to modify files in the release | ||
96 | # directory because checksetup.pl will change permissions so that the files are | ||
97 | # owned by that user. Without those permission changes running plack will fail | ||
98 | # with permission errors. Additionally, all checksetup.pl invocations must | ||
99 | # happen as the bugzilla user for permissions to be properly updated. | ||
100 | |||
101 | chown -R bugzilla /var/www/html/bugzilla-release-${bz_version} && \ | ||
102 | |||
103 | # First time creates the config file | ||
104 | cd /var/www/html/bugzilla && sudo -u bugzilla ./checksetup.pl /tmp/answers.pl && \ | ||
105 | |||
106 | # Second time does the real setup | ||
107 | cd /var/www/html/bugzilla && sudo -u bugzilla ./checksetup.pl /tmp/answers.pl && \ | ||
108 | |||
109 | # Allow admin overrides | ||
110 | mkdir /srv/bugzilla && \ | ||
111 | |||
112 | mv /var/www/html/bugzilla/localconfig /srv/bugzilla/localconfig && \ | ||
113 | ln -s /srv/bugzilla/localconfig /var/www/html/bugzilla/localconfig && \ | ||
114 | |||
115 | mv /var/www/html/bugzilla/data/db /srv/bugzilla/ && \ | ||
116 | ln -s /srv/bugzilla/db /var/www/html/bugzilla/data/ && \ | ||
117 | |||
118 | mv /var/www/html/bugzilla/data/attachments /srv/bugzilla/ && \ | ||
119 | ln -s /srv/bugzilla/attachments /var/www/html/bugzilla/data/ && \ | ||
120 | |||
121 | mv /var/www/html/bugzilla/data/mining /srv/bugzilla/ && \ | ||
122 | ln -s /srv/bugzilla/mining /var/www/html/bugzilla/data/ && \ | ||
123 | |||
124 | cp /var/www/html/bugzilla/data/params.json /srv/bugzilla/ && \ | ||
125 | |||
126 | # Enable voting extension | ||
127 | rm /var/www/html/bugzilla/extensions/Voting/disabled && \ | ||
128 | |||
129 | # Patch the code | ||
130 | # Update the email_in script to lookup by email instead of assuming that | ||
131 | # usernames are the same as email addresses. | ||
132 | cd / && patch -p1 < /tmp/email_in.pl.patch && \ | ||
133 | |||
134 | # Clean up | ||
135 | rm /etc/apt/apt.conf && \ | ||
136 | apt-get clean && \ | ||
137 | rm -rf /var/lib/apt/lists/* && \ | ||
138 | rm -rf /tmp/* | ||
139 | |||
140 | ADD usr/ /usr/ | ||
141 | ADD etc/ /etc/ | ||
142 | |||
143 | STOPSIGNAL SIGHUP | ||
144 | CMD [ "/usr/bin/dumb-init", "/usr/bin/runsvdir", "/etc/service" ] | ||