-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README that references instructions for building containers on di…
…fferent versions of PHP, and add a couple of new php versions.
- Loading branch information
1 parent
29c9a25
commit 42e1244
Showing
18 changed files
with
358 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
FROM php:7.1-apache-jessie | ||
|
||
# Install apt packages | ||
# | ||
# Required for php extensions | ||
# * gd: libpng-dev | ||
# * imagick: libmagickwand-dev | ||
# * imap: libc-client-dev, libkrb5-dev | ||
# * intl: libicu-dev | ||
# * mcrypt: libmcrypt-dev | ||
# * soap: libxml2-dev | ||
# * zip: zlib1g-dev | ||
# | ||
# Used in the build process | ||
# * git | ||
# * mysql-client | ||
# * sudo | ||
# * unzip | ||
# * zip | ||
# * node 9.x (from nodesource repository) | ||
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
libc-client-dev \ | ||
libicu-dev \ | ||
libkrb5-dev \ | ||
libmagickwand-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libxml2-dev \ | ||
msmtp-mta \ | ||
mysql-client \ | ||
nodejs \ | ||
sudo \ | ||
unzip \ | ||
zip \ | ||
zlib1g-dev \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
# Install php extensions (curl, json, mbstring, openssl, posix, phar | ||
# are installed already and don't need to be specified here) | ||
RUN docker-php-ext-install bcmath \ | ||
&& docker-php-ext-install gd \ | ||
&& docker-php-ext-install gettext \ | ||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ | ||
&& docker-php-ext-install imap \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install mcrypt \ | ||
&& docker-php-ext-install mysqli \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-install soap \ | ||
&& docker-php-ext-install zip | ||
|
||
RUN pecl install imagick \ | ||
&& pecl install xdebug | ||
|
||
RUN a2enmod rewrite | ||
|
||
RUN useradd --home-dir /buildkit --create-home buildkit | ||
|
||
COPY sudo /etc/sudoers.d/buildkit | ||
|
||
USER buildkit | ||
|
||
WORKDIR /buildkit | ||
|
||
ENV PATH="/buildkit/bin:${PATH}" | ||
|
||
RUN git clone https://github.com/civicrm/civicrm-buildkit.git buildkit-tmp | ||
|
||
RUN mv buildkit-tmp/* buildkit-tmp/.git* . | ||
|
||
RUN rmdir buildkit-tmp | ||
|
||
# Need to create this before we configure apache, otherwise it will complain | ||
RUN mkdir -p .amp/apache.d | ||
|
||
RUN mkdir -p .cache/bower | ||
|
||
RUN mkdir .composer | ||
|
||
RUN mkdir .drush | ||
|
||
RUN mkdir .npm | ||
|
||
RUN civi-download-tools | ||
|
||
RUN civibuild cache-warmup | ||
|
||
COPY --chown=buildkit:buildkit amp.services.yml /buildkit/.amp/services.yml | ||
|
||
COPY buildkit.ini /usr/local/etc/php/conf.d/buildkit.ini | ||
|
||
COPY msmtprc /etc/msmtprc | ||
|
||
COPY apache.conf /etc/apache2/conf-enabled/buildkit.conf | ||
|
||
RUN rm /buildkit/app/civicrm.settings.d/100-mail.php | ||
|
||
COPY civibuild.conf /buildkit/app/civibuild.conf | ||
|
||
COPY apache24-vhost.php /buildkit/build/.amp/apache24-vhost.php | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
parameters: | ||
version: 2 | ||
db_type: mysql_dsn | ||
mysql_dsn: 'mysql://root:buildkit@mysql:3306' | ||
perm_type: linuxAcl | ||
perm_user: www-data | ||
hosts_type: file | ||
httpd_type: apache24 | ||
httpd_visibility: all | ||
httpd_shared_ports: '8080' | ||
httpd_restart_command: 'sudo /usr/sbin/apachectl graceful' | ||
services: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
IncludeOptional /buildkit/.amp/apache.d/*.conf | ||
ServerName localhost | ||
Listen 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/* Apache Virtual Host Template | ||
* | ||
* @var string $root - the local path to the web root | ||
* @var string $host - the hostname to listen for | ||
* @var int $port - the port to listen for | ||
* @var string $include_vhost_file - the local path to a related config file | ||
* @var string $visibility - which interfaces the vhost is available on | ||
*/ | ||
|
||
?> | ||
|
||
<?php if ($use_listen) { ?> | ||
<?php if ($visibility === 'all'): ?> | ||
Listen <?php echo $port ?> | ||
<?php else: ?> | ||
Listen 127.0.0.1:<?php echo $port ?> | ||
<?php endif; ?> | ||
<?php } ?> | ||
|
||
<VirtualHost *:<?php echo $port ?>> | ||
ServerAdmin webmaster@<?php echo $host ?> | ||
|
||
DocumentRoot "<?php echo $root ?>" | ||
|
||
ServerName <?php echo $host ?> | ||
|
||
<Directory "<?php echo $root ?>"> | ||
Options All | ||
AllowOverride All | ||
<IfModule mod_authz_host.c> | ||
Require <?php echo $visibility ?> granted | ||
</IfModule> | ||
</Directory> | ||
|
||
<?php if (!empty($include_vhost_file)) { ?> | ||
Include <?php echo $include_vhost_file ?> | ||
<?php } ?> | ||
|
||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
memory_limit = 1024M | ||
cgi.fix_pathinfo = Off | ||
sendmail_path=/usr/sbin/sendmail -t -i | ||
|
||
zend_extension=xdebug.so | ||
xdebug.show_error_trace = On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# See https://github.com/civicrm/civicrm-buildkit/blob/master/app/civibuild.conf.tmpl | ||
|
||
# Using the buildkit suffix rather than chrome's dev suffix because of | ||
# https://www.theregister.co.uk/2017/11/29/google_dev_network/ | ||
URL_TEMPLATE="http://%SITE_NAME%.buildkit:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
host maildev | ||
auto_from on | ||
maildomain buildkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
buildkit ALL=(ALL) NOPASSWD:ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
FROM php:7.2-apache-jessie | ||
|
||
# Install apt packages | ||
# | ||
# Required for php extensions | ||
# * gd: libpng-dev | ||
# * imagick: libmagickwand-dev | ||
# * imap: libc-client-dev, libkrb5-dev | ||
# * intl: libicu-dev | ||
# * mcrypt: libmcrypt-dev | ||
# * soap: libxml2-dev | ||
# * zip: zlib1g-dev | ||
# | ||
# Used in the build process | ||
# * git | ||
# * mysql-client | ||
# * sudo | ||
# * unzip | ||
# * zip | ||
# * node 9.x (from nodesource repository) | ||
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
libc-client-dev \ | ||
libicu-dev \ | ||
libkrb5-dev \ | ||
libmagickwand-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libxml2-dev \ | ||
msmtp-mta \ | ||
mysql-client \ | ||
nodejs \ | ||
sudo \ | ||
unzip \ | ||
zip \ | ||
zlib1g-dev \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
# Install php extensions (curl, json, mbstring, openssl, posix, phar | ||
# are installed already and don't need to be specified here) | ||
RUN docker-php-ext-install bcmath \ | ||
&& docker-php-ext-install gd \ | ||
&& docker-php-ext-install gettext \ | ||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ | ||
&& docker-php-ext-install imap \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install mcrypt \ | ||
&& docker-php-ext-install mysqli \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-install soap \ | ||
&& docker-php-ext-install zip | ||
|
||
RUN pecl install imagick \ | ||
&& pecl install xdebug | ||
|
||
RUN a2enmod rewrite | ||
|
||
RUN useradd --home-dir /buildkit --create-home buildkit | ||
|
||
COPY sudo /etc/sudoers.d/buildkit | ||
|
||
USER buildkit | ||
|
||
WORKDIR /buildkit | ||
|
||
ENV PATH="/buildkit/bin:${PATH}" | ||
|
||
RUN git clone https://github.com/civicrm/civicrm-buildkit.git buildkit-tmp | ||
|
||
RUN mv buildkit-tmp/* buildkit-tmp/.git* . | ||
|
||
RUN rmdir buildkit-tmp | ||
|
||
# Need to create this before we configure apache, otherwise it will complain | ||
RUN mkdir -p .amp/apache.d | ||
|
||
RUN mkdir -p .cache/bower | ||
|
||
RUN mkdir .composer | ||
|
||
RUN mkdir .drush | ||
|
||
RUN mkdir .npm | ||
|
||
RUN civi-download-tools | ||
|
||
RUN civibuild cache-warmup | ||
|
||
COPY --chown=buildkit:buildkit amp.services.yml /buildkit/.amp/services.yml | ||
|
||
COPY buildkit.ini /usr/local/etc/php/conf.d/buildkit.ini | ||
|
||
COPY msmtprc /etc/msmtprc | ||
|
||
COPY apache.conf /etc/apache2/conf-enabled/buildkit.conf | ||
|
||
RUN rm /buildkit/app/civicrm.settings.d/100-mail.php | ||
|
||
COPY civibuild.conf /buildkit/app/civibuild.conf | ||
|
||
COPY apache24-vhost.php /buildkit/build/.amp/apache24-vhost.php | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
parameters: | ||
version: 2 | ||
db_type: mysql_dsn | ||
mysql_dsn: 'mysql://root:buildkit@mysql:3306' | ||
perm_type: linuxAcl | ||
perm_user: www-data | ||
hosts_type: file | ||
httpd_type: apache24 | ||
httpd_visibility: all | ||
httpd_shared_ports: '8080' | ||
httpd_restart_command: 'sudo /usr/sbin/apachectl graceful' | ||
services: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
IncludeOptional /buildkit/.amp/apache.d/*.conf | ||
ServerName localhost | ||
Listen 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/* Apache Virtual Host Template | ||
* | ||
* @var string $root - the local path to the web root | ||
* @var string $host - the hostname to listen for | ||
* @var int $port - the port to listen for | ||
* @var string $include_vhost_file - the local path to a related config file | ||
* @var string $visibility - which interfaces the vhost is available on | ||
*/ | ||
|
||
?> | ||
|
||
<?php if ($use_listen) { ?> | ||
<?php if ($visibility === 'all'): ?> | ||
Listen <?php echo $port ?> | ||
<?php else: ?> | ||
Listen 127.0.0.1:<?php echo $port ?> | ||
<?php endif; ?> | ||
<?php } ?> | ||
|
||
<VirtualHost *:<?php echo $port ?>> | ||
ServerAdmin webmaster@<?php echo $host ?> | ||
|
||
DocumentRoot "<?php echo $root ?>" | ||
|
||
ServerName <?php echo $host ?> | ||
|
||
<Directory "<?php echo $root ?>"> | ||
Options All | ||
AllowOverride All | ||
<IfModule mod_authz_host.c> | ||
Require <?php echo $visibility ?> granted | ||
</IfModule> | ||
</Directory> | ||
|
||
<?php if (!empty($include_vhost_file)) { ?> | ||
Include <?php echo $include_vhost_file ?> | ||
<?php } ?> | ||
|
||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
memory_limit = 1024M | ||
cgi.fix_pathinfo = Off | ||
sendmail_path=/usr/sbin/sendmail -t -i | ||
|
||
zend_extension=xdebug.so | ||
xdebug.show_error_trace = On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# See https://github.com/civicrm/civicrm-buildkit/blob/master/app/civibuild.conf.tmpl | ||
|
||
# Using the buildkit suffix rather than chrome's dev suffix because of | ||
# https://www.theregister.co.uk/2017/11/29/google_dev_network/ | ||
URL_TEMPLATE="http://%SITE_NAME%.buildkit:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
host maildev | ||
auto_from on | ||
maildomain buildkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
buildkit ALL=(ALL) NOPASSWD:ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters