diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 588c58b..5b89adf 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -3,9 +3,19 @@ on: # Trigger the workflow on push or pull request, # but only for the master branch push: + paths-ignore: + - 'README.md' + - 'docs/' + - 'LICENCE' + - 'Makefile' branches: - master pull_request: + paths-ignore: + - 'README.md' + - 'docs/' + - 'LICENCE' + - 'Makefile' branches: - master - release/** @@ -38,11 +48,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Pull Docker images - run: docker-compose pull - - - name: Build Image - run: ./build/build-image.sh ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} + - name: Build Images + env: + TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} + BUILD_DIR: ${{ matrix.php }}/${{ matrix.distro }}/${{ matrix.os }} + run: docker-compose build - name: Get Composer Cache Directory id: composer-data @@ -63,11 +73,6 @@ jobs: COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }} run: docker-compose run create-project - - name: Install Silverstripe test project - env: - COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }} - run: docker-compose run install-project - - name: Run tests env: TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} @@ -99,11 +104,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Pull Docker images - run: docker-compose pull - - - name: Build Image - run: ./build/build-image.sh ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} + - name: Build Images + env: + TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} + BUILD_DIR: ${{ matrix.php }}/${{ matrix.distro }}/${{ matrix.os }} + run: docker-compose build - name: Get Composer Cache Directory id: composer-data @@ -124,11 +129,6 @@ jobs: COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }} run: docker-compose run create-project - - name: Install Silverstripe test project - env: - COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }} - run: docker-compose run install-project - - name: Run tests env: TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }} diff --git a/5.6/apache/jessie/Dockerfile b/5.6/apache/jessie/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/5.6/apache/jessie/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/5.6/apache/stretch/Dockerfile b/5.6/apache/stretch/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/5.6/apache/stretch/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/5.6/cli/jessie/Dockerfile b/5.6/cli/jessie/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/5.6/cli/jessie/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/5.6/cli/stretch/Dockerfile b/5.6/cli/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/5.6/cli/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/5.6/fpm/jessie/Dockerfile b/5.6/fpm/jessie/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/5.6/fpm/jessie/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/5.6/fpm/stretch/Dockerfile b/5.6/fpm/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/5.6/fpm/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/apache/buster/Dockerfile b/7.1/apache/buster/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.1/apache/buster/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.1/apache/jessie/Dockerfile b/7.1/apache/jessie/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.1/apache/jessie/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.1/apache/stretch/Dockerfile b/7.1/apache/stretch/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.1/apache/stretch/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.1/cli/buster/Dockerfile b/7.1/cli/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/cli/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/cli/jessie/Dockerfile b/7.1/cli/jessie/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/cli/jessie/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/cli/stretch/Dockerfile b/7.1/cli/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/cli/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/fpm/buster/Dockerfile b/7.1/fpm/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/fpm/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/fpm/jessie/Dockerfile b/7.1/fpm/jessie/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/fpm/jessie/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.1/fpm/stretch/Dockerfile b/7.1/fpm/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.1/fpm/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.2/apache/buster/Dockerfile b/7.2/apache/buster/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.2/apache/buster/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.2/apache/stretch/Dockerfile b/7.2/apache/stretch/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.2/apache/stretch/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.2/cli/buster/Dockerfile b/7.2/cli/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.2/cli/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.2/cli/stretch/Dockerfile b/7.2/cli/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.2/cli/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.2/fpm/buster/Dockerfile b/7.2/fpm/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.2/fpm/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.2/fpm/stretch/Dockerfile b/7.2/fpm/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.2/fpm/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.3/apache/buster/Dockerfile b/7.3/apache/buster/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.3/apache/buster/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.3/apache/stretch/Dockerfile b/7.3/apache/stretch/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.3/apache/stretch/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.3/cli/buster/Dockerfile b/7.3/cli/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.3/cli/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.3/cli/stretch/Dockerfile b/7.3/cli/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.3/cli/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.3/fpm/buster/Dockerfile b/7.3/fpm/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.3/fpm/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.3/fpm/stretch/Dockerfile b/7.3/fpm/stretch/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.3/fpm/stretch/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.4/apache/buster/Dockerfile b/7.4/apache/buster/Dockerfile new file mode 100644 index 0000000..7159dac --- /dev/null +++ b/7.4/apache/buster/Dockerfile @@ -0,0 +1,49 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini +# Apache configuration +ENV DOCUMENT_ROOT /var/www/html +RUN { \ + echo ''; \ + echo ' DocumentRoot ${DOCUMENT_ROOT}'; \ + echo ' LogLevel warn'; \ + echo ' ServerSignature Off'; \ + echo ' '; \ + echo ' Options +FollowSymLinks'; \ + echo ' Options -ExecCGI -Includes -Indexes'; \ + echo ' AllowOverride all'; \ + echo; \ + echo ' Require all granted'; \ + echo ' '; \ + echo ' '; \ + echo ' php_flag engine off'; \ + echo ' '; \ + echo; \ + echo ' IncludeOptional sites-available/000-default.local*'; \ + echo ''; \ + } | tee /etc/apache2/sites-available/000-default.conf && \ + echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \ + a2enmod rewrite expires remoteip cgid headers diff --git a/7.4/cli/buster/Dockerfile b/7.4/cli/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.4/cli/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/7.4/fpm/buster/Dockerfile b/7.4/fpm/buster/Dockerfile new file mode 100644 index 0000000..020d547 --- /dev/null +++ b/7.4/fpm/buster/Dockerfile @@ -0,0 +1,26 @@ +ARG TAG + +FROM php:$TAG +MAINTAINER Brett Tasker "" +ENV DEBIAN_FRONTEND=noninteractive +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions + +# Install default PHP Extensions +RUN install-php-extensions \ + bcmath \ + mysqli \ + pdo \ + pdo_mysql \ + intl \ + ldap \ + gd \ + soap \ + tidy \ + xsl \ + zip \ + exif \ + gmp + +# Pipe errors to stdErr +RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \ + echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini diff --git a/Makefile b/Makefile index df65d6f..7989e9e 100644 --- a/Makefile +++ b/Makefile @@ -39,20 +39,16 @@ build-image: new-test: @echo "Running new test" @echo " Tag: $(TAG)" + @echo " Build dir: $(subst -,/,$(subst -,/,$(TAG)))" @echo @$(MAKE) --quiet clean - @$(MAKE) --quiet build-image $(TAG) - @$(MAKE) --quiet test-build-image $(TAG) + @BUILD_DIR=$(subst -,/,$(subst -,/,$(TAG))) $(MAKE) --quiet test-build-image $(TAG) @FRAMEWORK=$(FRAMEWORK) $(MAKE) --quiet create-project $(TAG) - @$(MAKE) --quiet install-project $(TAG) @$(MAKE) --quiet test $(TAG) create-project: TAG=$(TAG) FRAMEWORK=$(FRAMEWORK) docker-compose run create-project -install-project: - TAG=$(TAG) docker-compose run install-project - test-build-image: TAG=${TAG} docker-compose build diff --git a/README.md b/README.md index ab7ff24..5a6ac32 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,53 @@ +![Github CI](https://github.com/brettt89/silverstripe-docker/workflows/Test%20Silverstripe%20installation/badge.svg) + # Supported Tags -- `7.4-apache-buster`, `7.4-apache`, `7.4`, `latest` -- `7.4-fpm-buster`, `7.4-fpm` -- `7.3-apache-buster`, `7.3-apache`, `7.3` -- `7.3-fpm-buster`, `7.3-fpm` -- `7.3-cli-buster`, `7.3-cli` -- `7.3-apache-stretch` -- `7.3-fpm-stretch` -- `7.3-cli-stretch` -- `7.2-apache-buster`, `7.2-apache`, `7.2` -- `7.2-fpm-buster`, `7.2-fpm` -- `7.2-cli-buster`, `7.2-cli` -- `7.2-apache-stretch` -- `7.2-fpm-stretch` -- `7.2-cli-stretch` -- `7.1-apache-buster`, `7.1-apache`, `7.1` -- `7.1-fpm-buster`, `7.1-fpm` -- `7.1-cli-buster`, `7.1-cli` -- `7.1-apache-stretch` -- `7.1-fpm-stretch` -- `7.1-cli-stretch` -- `7.1-apache-jessie` -- `7.1-fpm-jessie` -- `7.1-cli-jessie` -- `5.6-apache-stretch`, `5.6-apache`, `5.6` -- `5.6-fpm-stretch`, `5.6-fpm` -- `5.6-cli-stretch`, `5.6-cli` -- `5.6-apache-jessie` -- `5.6-fpm-jessie` -- `5.6-cli-jessie` +- [`7.4-apache-buster`, `7.4-apache`, `7.4`, `latest`](https://github.com/brettt89/silverstripe-docker/blob/master/7.4/apache/Dockerfile) +- [`7.4-fpm-buster`, `7.4-fpm`](https://github.com/brettt89/silverstripe-docker/blob/master/7.4/fpm/buster/Dockerfile) +- [`7.3-apache-buster`, `7.3-apache`, `7.3`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/apache/buster/Dockerfile) +- [`7.3-fpm-buster`, `7.3-fpm`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/fpm/buster/Dockerfile) +- [`7.3-cli-buster`, `7.3-cli`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/cli/buster/Dockerfile) +- [`7.3-apache-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/apache/stretch/Dockerfile) +- [`7.3-fpm-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/fpm/stretch/Dockerfile) +- [`7.3-cli-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.3/cli/stretch/Dockerfile) +- [`7.2-apache-buster`, `7.2-apache`, `7.2`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/apache/buster/Dockerfile) +- [`7.2-fpm-buster`, `7.2-fpm`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/fpm/buster/Dockerfile) +- [`7.2-cli-buster`, `7.2-cli`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/cli/buster/Dockerfile) +- [`7.2-apache-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/apache/stretch/Dockerfile) +- [`7.2-fpm-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/fpm/stretch/Dockerfile) +- [`7.2-cli-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.2/cli/stretch/Dockerfile) +- [`7.1-apache-buster`, `7.1-apache`, `7.1`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/apache/buster/Dockerfile) +- [`7.1-fpm-buster`, `7.1-fpm`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/fpm/buster/Dockerfile) +- [`7.1-cli-buster`, `7.1-cli`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/cli/buster/Dockerfile) +- [`7.1-apache-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/apache/stretch/Dockerfile) +- [`7.1-fpm-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/fpm/stretch/Dockerfile) +- [`7.1-cli-stretch`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/cli/stretch/Dockerfile) +- [`7.1-apache-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/apache/jessie/Dockerfile) +- [`7.1-fpm-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/fpm/jessie/Dockerfile) +- [`7.1-cli-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/7.1/cli/jessie/Dockerfile) +- [`5.6-apache-stretch`, `5.6-apache`, `5.6`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/apache/stretch/Dockerfile) +- [`5.6-fpm-stretch`, `5.6-fpm`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/fpm/stretch/Dockerfile) +- [`5.6-cli-stretch`, `5.6-cli`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/cli/stretch/Dockerfile) +- [`5.6-apache-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/apache/jessie/Dockerfile) +- [`5.6-fpm-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/fpm/jessie/Dockerfile) +- [`5.6-cli-jessie`](https://github.com/brettt89/silverstripe-docker/blob/master/5.6/cli/jessie/Dockerfile) ## Depreciated Tags (still available, but not updated) -- `7.3-debian-buster`, `7.3-debian` -- `7.3-debian-stretch` -- `7.2-debian-buster`, `7.2-debian` -- `7.2-debian-stretch` -- `7.1-debian-buster`, `7.1-debian` -- `7.1-debian-stretch` -- `7.1-debian-jessie` -- `5.6-debian-stretch`, `5.6-debian` -- `5.6-debian-jessie` +- [`7.3-debian-buster`, `7.3-debian`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.3/debian/buster/Dockerfile) +- [`7.3-debian-stretch`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.3/debian/stretch/Dockerfile) +- [`7.2-debian-buster`, `7.2-debian`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.2/buster/jessie/Dockerfile) +- [`7.2-debian-stretch`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.2/debian/stretch/Dockerfile) +- [`7.1-debian-buster`, `7.1-debian`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.1/buster/jessie/Dockerfile) +- [`7.1-debian-stretch`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.1/debian/stretch/Dockerfile) +- [`7.1-debian-jessie`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/7.1/debian/jessie/Dockerfile) +- [`5.6-debian-stretch`, `5.6-debian`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/5.6/debian/stretch/Dockerfile) +- [`5.6-debian-jessie`](https://github.com/brettt89/silverstripe-docker/blob/178e35a8d91f578117eaa4c9c7fc14ece35c80c3/5.6/debian/jessie/Dockerfile) # What is Silverstripe CMS Silverstripe CMS is a free and open source Content Management System (CMS) and Framework for creating and maintaining websites and web applications. It provides an out of the box web-based administration panel that enables users to make modifications to parts of the website, which includes a WYSIWYG website editor. The core of the software is Silverstripe Framework, a PHP Web application framework. - https://en.wikipedia.org/wiki/Silverstripe_CMS +https://en.wikipedia.org/wiki/Silverstripe_CMS ![Silverstripe CMS](docs/logo.png "Logo Title Text 1") diff --git a/build/build-image.sh b/build/build-image.sh index 44d40eb..5688a78 100755 --- a/build/build-image.sh +++ b/build/build-image.sh @@ -3,30 +3,45 @@ set -euo pipefail OUTPUT=${OUTPUT:-/dev/stdout} -IMAGE=${IMAGE-localrepo/silverstripe-web} - +IMAGE=${IMAGE-brettt89/silverstripe-web} TAG=${1:-7.4-apache-buster} -TMP_BUILD_DIR=$(mktemp -d) -TMP_DOCKERFILE="${TMP_BUILD_DIR%/}/Dockerfile" - DOCKER_BUILD_ARGS="--build-arg TAG=${TAG}" +BUILD_DIR="$(dirname "$(dirname "$(readlink -f "$BASH_SOURCE")")")" + +declare -a TAG_ARRAY +IFS='-' read -r -a TAG_ARRAY <<< "$TAG" + +PHP_VERSION="${TAG_ARRAY[0]:-}" +PACKAGE="${TAG_ARRAY[1]:-}" +DISTRO="${TAG_ARRAY[2]:-}" + +if [ -n "${PHP_VERSION}" ]; then + BUILD_DIR="${BUILD_DIR}/$PHP_VERSION" +fi + +if [ -n "${PACKAGE}" ]; then + BUILD_DIR="${BUILD_DIR}/$PACKAGE" +fi + +if [ -n "${DISTRO}" ]; then + BUILD_DIR="${BUILD_DIR}/$DISTRO" +fi + +mkdir -p "${BUILD_DIR}" +DOCKERFILE="${BUILD_DIR%/}/Dockerfile" function add_file() { local FILE=$1 local CONTENT="" if [ -f "${FILE}" ] ; then CONTENT=$(cat "${FILE}") - printf "%s\n" "${CONTENT}" >> "${TMP_DOCKERFILE}" + printf "%s\n" "${CONTENT}" >> "${DOCKERFILE}" fi } -function cleanup() { - rm -rf "$TMP_BUILD_DIR" || true -} - # Remove any old file -rm -f "${TMP_DOCKERFILE}" || true +rm -f "${DOCKERFILE}" || true if [[ "${TAG}" =~ alpine ]] ; then TEMPLATE_DIR="src/alpine" @@ -40,19 +55,17 @@ add_file "src/Dockerfile" # Add PHP configurations add_file "${TEMPLATE_DIR}/Dockerfile.php.tpl" -if [[ "${TAG}" =~ apache ]] ; then +if [ "${PACKAGE}" == "apache" ] ; then add_file "${TEMPLATE_DIR}/Dockerfile.apache.tpl" fi -if [[ "${TAG}" =~ 7.4 ]] ; then +if [ "${PHP_VERSION}" == "7.4" ] ; then DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg GD_BUILD_ARGS=" fi echo "Building image: '${IMAGE}:${TAG}'" -cat "${TMP_DOCKERFILE}" > "${OUTPUT}" -docker build -t "${IMAGE}:${TAG}" ${DOCKER_BUILD_ARGS} "${TMP_BUILD_DIR%/}" > "${OUTPUT}" +cat "${DOCKERFILE}" > "${OUTPUT}" +docker build -t "${IMAGE}:${TAG}" ${DOCKER_BUILD_ARGS} "${BUILD_DIR%/}" > "${OUTPUT}" # If we got this far, then all good. remove log. -rm -f build.log || true - -trap cleanup EXIT \ No newline at end of file +rm -f build.log || true \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f0e488e..a51a435 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,12 +16,11 @@ services: silverstripe: build: - context: ./tests - dockerfile: Dockerfile.test + context: ${BUILD_DIR:-7.4/apache/buster} + dockerfile: Dockerfile args: - IMAGE: ${IMAGE:-localrepo/silverstripe-web} TAG: ${TAG:-7.4-apache-buster} - image: ${IMAGE:-localrepo/silverstripe-web}:${TAG:-7.4-apache-buster} + image: ${IMAGE:-brettt89/silverstripe-web}:${TAG:-7.4-apache-buster} volumes: - codebase:${MOUNT_DIR:-/var/www/html} depends_on: @@ -38,14 +37,7 @@ services: create-project: image: composer - command: create-project silverstripe/installer . ^${FRAMEWORK:-4} --ignore-platform-reqs --no-install - volumes: - - codebase:/app - - ${COMPOSER_HOME:-~/.composer}:/tmp - - install-project: - image: composer - command: install --ignore-platform-reqs + command: create-project silverstripe/installer . ^${FRAMEWORK:-4} --ignore-platform-reqs volumes: - codebase:/app - ${COMPOSER_HOME:-~/.composer}:/tmp diff --git a/docs/logo.png b/docs/logo.png index 7fa2a38..3a21e02 100644 Binary files a/docs/logo.png and b/docs/logo.png differ