summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-07-25 21:19:54 +0200
committerGitHub <noreply@github.com>2017-07-25 21:19:54 +0200
commitea1d22b3f6151d7316ef73c4b4f08a4c8b591c72 (patch)
tree3eb14bab0b3a6389dc69cdbf0160b12a3aed287a /Dockerfile
parenta01545cbec992560a5bfe402cf395aabb97d5cfd (diff)
downloadbugzilla-ea1d22b3f6151d7316ef73c4b4f08a4c8b591c72.tar.gz
bugzilla-ea1d22b3f6151d7316ef73c4b4f08a4c8b591c72.tar.xz
Bug 1380531 - Write initial CircleCI configuration for BMO
This is the first (working) iteration of a configuration that allows CircleCI to build 'bmo' docker images that are runnable. Some other changes were required for this: 1. The base image used in Dockerfile was changed from centos:6.7 to mozillabteam/bmo-base:slim. This is a new version of (github) mozilla-bteam/docker-bmo-base which is much smaller, and includes all the system RPMs and other bits that our bmo Dockerfile expects. 2. init.pl mistakenly had '--no-assets' which is not currently a checksetup.pl option. 3. 901-secure-mail-loop.t (which checks for an infinite loop) had to have its timeout increased because CircleCI sometimes is quite slow. 4. version.txt // __version__ now includes build information from CircleCI environmental variables
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile24
1 files changed, 4 insertions, 20 deletions
diff --git a/Dockerfile b/Dockerfile
index dd103a5db..f0477b655 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,8 @@
-FROM centos:6.7
+FROM mozillabteam/bmo-base:slim
MAINTAINER Dylan William Hardison <dylan@mozilla.com>
-RUN yum update -y && \
- yum install -y perl perl-core mod_perl httpd wget tar openssl mysql-libs gd git && \
- wget -q https://s3.amazonaws.com/moz-devservices-bmocartons/bmo/vendor.tar.gz && \
- tar -C /opt -zxvf /vendor.tar.gz bmo/local/ bmo/LIBS.txt bmo/cpanfile bmo/cpanfile.snapshot && \
+RUN wget -q https://s3.amazonaws.com/moz-devservices-bmocartons/bmo/vendor.tar.gz && \
+ tar -C /opt -zxf /vendor.tar.gz bmo/local/ bmo/LIBS.txt bmo/cpanfile bmo/cpanfile.snapshot && \
rm /vendor.tar.gz && \
mkdir /opt/bmo/httpd && \
ln -s /usr/lib64/httpd/modules /opt/bmo/httpd/modules && \
@@ -12,21 +10,7 @@ RUN yum update -y && \
cp {/etc/httpd/conf,/opt/bmo/httpd}/magic && \
awk '{print $1}' > LIBS.txt \
| perl -nE 'chomp; unless (-f $_) { $missing++; say $_ } END { exit 1 if $missing }' && \
- useradd -u 10001 -U app -m && \
- curl -L https://cpanmin.us > /usr/local/bin/cpanm && \
- chmod 755 /usr/local/bin/cpanm && \
- mkdir /opt/bmo/build && \
- rpm -qa > /tmp/rpms.list && \
- yum install -y gcc mod_perl-devel && \
- cpanm -l /opt/bmo/build --notest Apache2::SizeLimit && \
- yum erase -y $(rpm -qa | diff -u - /tmp/rpms.list | sed -n '/^-[^-]/ s/^-//p') && \
- rm -rf /opt/bmo/build/lib/perl5/{CPAN,Parse,JSON,ExtUtils} && \
- mkdir /usr/local/share/perl5 && \
- mv /opt/bmo/build/lib/perl5/x86_64-linux-thread-multi/ /usr/local/lib64/perl5/ && \
- mv /opt/bmo/build/lib/perl5/Linux /usr/local/share/perl5/ && \
- rm -vfr /opt/bmo/build && \
- rm /tmp/rpms.list /usr/local/bin/cpanm && \
- yum clean all -y
+ useradd -u 10001 -U app -m
COPY . /app
WORKDIR /app