From 903b4e520c67c5b8d05591a2cce4540ef54cf7f7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 10 Aug 2019 17:21:58 +0200 Subject: [PATCH] New Docker files. --- Dockerfile | 30 +++++++++++------------------- Dockerfile.amd64 | 30 +++++++++++------------------- Dockerfile.arm | 32 +++++++++----------------------- Dockerfile.arm64 | 33 ++++++++++----------------------- composer.json | 1 + composer.lock | 17 ++++++++--------- 6 files changed, 50 insertions(+), 93 deletions(-) diff --git a/Dockerfile b/Dockerfile index 590e644763..da7ce12ded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,22 @@ FROM php:7.2-apache ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 -LABEL version="1.4" maintainer="thegrumpydictator@gmail.com" +LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" # Create volumes VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y libpng-dev \ - libicu-dev \ - unzip \ - gettext-base \ - libldap2-dev \ - libpq-dev \ - locales \ - libmemcached-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ - docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \ - pecl install memcached-3.1.3 && \ - docker-php-ext-enable memcached && \ - a2enmod rewrite && a2enmod ssl && \ - echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ - locale-gen && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ + +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ + install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached + +RUN a2enmod rewrite && a2enmod ssl +RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen +RUN locale-gen +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # configure PHP RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \ diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index e6f6e58dca..f9d2760fc6 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,31 +1,23 @@ FROM php:7.2-apache ARG ARCH ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 -LABEL version="1.4" maintainer="thegrumpydictator@gmail.com" +LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" # Create volumes VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y libpng-dev \ - libicu-dev \ - unzip \ - gettext-base \ - libldap2-dev \ - libpq-dev \ - locales \ - libmemcached-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ - docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \ - pecl install memcached-3.1.3 && \ - docker-php-ext-enable memcached && \ - a2enmod rewrite && a2enmod ssl && \ - echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ - locale-gen && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ + +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ + install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached + +RUN a2enmod rewrite && a2enmod ssl +RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen +RUN locale-gen +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # configure PHP RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \ diff --git a/Dockerfile.arm b/Dockerfile.arm index 8b8f8264b5..55202f7e3a 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -2,37 +2,23 @@ FROM arm32v7/php:7.2-apache-stretch ARG ARCH COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 -LABEL version="1.4" maintainer="thegrumpydictator@gmail.com" +LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" # Create volumes VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y libpng-dev \ - libicu-dev \ - unzip \ - gettext-base \ - libldap2-dev \ - libpq-dev \ - locales \ - libmemcached-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ - docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \ - pecl install memcached-3.1.3 && \ - docker-php-ext-enable memcached && \ - a2enmod rewrite && a2enmod ssl && \ - echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ - locale-gen && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ -# configure PHP +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ + install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached -RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; exit 0 -RUN sed -i 's/max_execution_time = 30/max_execution_time = 600/' /usr/local/etc/php/php.ini; exit 0 -RUN sed -i 's/memory_limit = 128M/memory_limit = 512M/' /usr/local/etc/php/php.ini; exit 0 +RUN a2enmod rewrite && a2enmod ssl +RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen +RUN locale-gen +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Copy in Firefly III source WORKDIR $FIREFLY_PATH diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index cfc8f4e6f2..55202f7e3a 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -2,36 +2,23 @@ FROM arm32v7/php:7.2-apache-stretch ARG ARCH COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 -LABEL version="1.4" maintainer="thegrumpydictator@gmail.com" +LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" # Create volumes VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y libpng-dev \ - libicu-dev \ - unzip \ - gettext-base \ - libldap2-dev \ - libpq-dev \ - locales \ - libmemcached-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ - docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \ - pecl install memcached-3.1.3 && \ - docker-php-ext-enable memcached && \ - a2enmod rewrite && a2enmod ssl && \ - echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ - locale-gen && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ -# configure PHP -RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \ - sed -i 's/max_execution_time = 30/max_execution_time = 600/' /usr/local/etc/php/php.ini && \ - sed -i 's/memory_limit = 128M/memory_limit = 512M/' /usr/local/etc/php/php.ini +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ + install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached + +RUN a2enmod rewrite && a2enmod ssl +RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen +RUN locale-gen +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Copy in Firefly III source WORKDIR $FIREFLY_PATH diff --git a/composer.json b/composer.json index 080aa5df42..1f3d367584 100644 --- a/composer.json +++ b/composer.json @@ -61,6 +61,7 @@ "ext-fileinfo": "*", "ext-gd": "*", "ext-intl": "*", + "ext-session": "*", "ext-json": "*", "ext-openssl": "*", "ext-simplexml": "*", diff --git a/composer.lock b/composer.lock index d584d3c3de..cd14b77aa9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "46b4edbe3ec2ec96772d5131a7013c88", + "content-hash": "37a04601a45e0a40bd62e1b79ffa73d1", "packages": [ { "name": "adldap2/adldap2", @@ -6099,20 +6099,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8d0a041a565fc1e927e75f1d1bea5f34edf6e7d1" + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8d0a041a565fc1e927e75f1d1bea5f34edf6e7d1", - "reference": "8d0a041a565fc1e927e75f1d1bea5f34edf6e7d1", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.1" }, "replace": { "myclabs/deep-copy": "self.version" @@ -6120,8 +6120,6 @@ "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", "phpunit/phpunit": "^7.1" }, "type": "library", @@ -6145,7 +6143,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:38:39+00:00" + "time": "2019-08-09T12:45:53+00:00" }, { "name": "phar-io/manifest", @@ -7879,6 +7877,7 @@ "ext-fileinfo": "*", "ext-gd": "*", "ext-intl": "*", + "ext-session": "*", "ext-json": "*", "ext-openssl": "*", "ext-simplexml": "*",