Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.9k
alpine php-fpm images#54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| FROM php:7.0-fpm-alpine | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use the same php version as used by the other images, this would mean for nextcloud 9/10 php 5.6 and for nextcloud 11 php 7.1. | ||
| # set recommended PHP.ini settings | ||
| # see https://secure.php.net/manual/en/opcache.installation.php | ||
| RUN { \ | ||
| echo 'opcache.memory_consumption=128'; \ | ||
| echo 'opcache.interned_strings_buffer=8'; \ | ||
| echo 'opcache.max_accelerated_files=4000'; \ | ||
| echo 'opcache.revalidate_freq=60'; \ | ||
| echo 'opcache.fast_shutdown=1'; \ | ||
| echo 'opcache.enable_cli=1'; \ | ||
| } > /usr/local/etc/php/conf.d/opcache-recommended.ini | ||
| # Install PHP extensions | ||
| # https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html | ||
| RUN set -ex \ | ||
| && apk update \ | ||
| && apk add build-base python-dev py-pip jpeg-dev jpeg \ | ||
| libldap openldap-dev zlib zlib-dev \ | ||
| freetype freetype-dev libjpeg-turbo libjpeg-turbo-dev \ | ||
| postgresql-dev libmcrypt-dev libmcrypt libpng-dev libpng \ | ||
| autoconf make g++ gcc git file gnupg re2c icu icu-dev tzdata \ | ||
| && docker-php-ext-configure gd \ | ||
| --with-freetype-dir=/usr/include/ \ | ||
| --with-png-dir=/usr/include \ | ||
| --with-jpeg-dir=/usr/include \ | ||
| && NPROC=$(getconf _NPROCESSORS_ONLN) \ | ||
| ||
| && docker-php-ext-install -j${NPROC} gd \ | ||
| && docker-php-ext-install exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && docker-php-ext-enable gd exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && pecl install APCu-5.1.6 \ | ||
| && git clone https://github.com/phpredis/phpredis.git \ | ||
| && cd phpredis \ | ||
| && git checkout php7 \ | ||
| && phpize \ | ||
| && ./configure \ | ||
| && make && make install \ | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't it possible to use pecl? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There were problems with php7 and Redis when I made the first version of the image but I'll try again. It would be cleaner.
| ||
| && cd .. \ | ||
| && rm -rf phpredis \ | ||
| && docker-php-ext-enable redis apcu \ | ||
| && apk del autoconf make g++ gcc git py-pip zlib-dev \ | ||
| jpeg-dev libmcrypt-dev libpng-dev openldap-dev \ | ||
| freetype-dev libjpeg-turbo-dev \ | ||
| && rm -rf /var/cache/apk/* | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible to have the same layers accross images? This would allow us to DRY things in the future. Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I'll try to use the same layers for php 5.6. | ||
| VOLUME /var/www/html | ||
| ENV NEXTCLOUD_VERSION 10.0.4 | ||
| RUN curl -fsSL -o nextcloud.tar.bz2 \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \ | ||
| && curl -fsSL -o nextcloud.tar.bz2.asc \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc" \ | ||
| && export GNUPGHOME="$(mktemp -d)" \ | ||
| # gpg key from https://nextcloud.com/nextcloud.asc | ||
| && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A \ | ||
| && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \ | ||
| && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \ | ||
| && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \ | ||
| && rm nextcloud.tar.bz2 | ||
| COPY docker-entrypoint.sh /entrypoint.sh | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
| CMD ["php-fpm"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/ash | ||
| set -e | ||
| if [ ! -e '/var/www/html/version.php' ]; then | ||
| tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - | ||
| chown -R www-data /var/www/html | ||
| fi | ||
| if [ -n "$TZ"]; then | ||
| cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
| fi | ||
| exec "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| FROM php:7.0-fpm-alpine | ||
| # set recommended PHP.ini settings | ||
| # see https://secure.php.net/manual/en/opcache.installation.php | ||
| RUN { \ | ||
| echo 'opcache.memory_consumption=128'; \ | ||
| echo 'opcache.interned_strings_buffer=8'; \ | ||
| echo 'opcache.max_accelerated_files=4000'; \ | ||
| echo 'opcache.revalidate_freq=60'; \ | ||
| echo 'opcache.fast_shutdown=1'; \ | ||
| echo 'opcache.enable_cli=1'; \ | ||
| } > /usr/local/etc/php/conf.d/opcache-recommended.ini | ||
| # Install PHP extensions | ||
| # https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html | ||
| RUN set -ex \ | ||
| && apk update \ | ||
| && apk add build-base python-dev py-pip jpeg-dev jpeg \ | ||
| libldap openldap-dev zlib zlib-dev \ | ||
| freetype freetype-dev libjpeg-turbo libjpeg-turbo-dev \ | ||
| postgresql-dev libmcrypt-dev libmcrypt libpng-dev libpng \ | ||
| autoconf make g++ gcc git file gnupg re2c icu icu-dev tzdata \ | ||
| && docker-php-ext-configure gd \ | ||
| --with-freetype-dir=/usr/include/ \ | ||
| --with-png-dir=/usr/include \ | ||
| --with-jpeg-dir=/usr/include \ | ||
| && NPROC=$(getconf _NPROCESSORS_ONLN) \ | ||
| && docker-php-ext-install -j${NPROC} gd \ | ||
| && docker-php-ext-install exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && docker-php-ext-enable gd exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && pecl install APCu-5.1.6 \ | ||
| && git clone https://github.com/phpredis/phpredis.git \ | ||
| && cd phpredis \ | ||
| && git checkout php7 \ | ||
| && phpize \ | ||
| && ./configure \ | ||
| && make && make install \ | ||
| && cd .. \ | ||
| && rm -rf phpredis \ | ||
| && docker-php-ext-enable redis apcu \ | ||
| && apk del autoconf make g++ gcc git py-pip zlib-dev \ | ||
| jpeg-dev libmcrypt-dev libpng-dev openldap-dev \ | ||
| freetype-dev libjpeg-turbo-dev \ | ||
| && rm -rf /var/cache/apk/* | ||
| VOLUME /var/www/html | ||
| ENV NEXTCLOUD_VERSION 11.0.2 | ||
| RUN curl -fsSL -o nextcloud.tar.bz2 \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \ | ||
| && curl -fsSL -o nextcloud.tar.bz2.asc \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc" \ | ||
| && export GNUPGHOME="$(mktemp -d)" \ | ||
| # gpg key from https://nextcloud.com/nextcloud.asc | ||
| && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A \ | ||
| && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \ | ||
| && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \ | ||
| && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \ | ||
| && rm nextcloud.tar.bz2 | ||
| COPY docker-entrypoint.sh /entrypoint.sh | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
| CMD ["php-fpm"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/ash | ||
| set -e | ||
| if [ ! -e '/var/www/html/version.php' ]; then | ||
| tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - | ||
| chown -R www-data /var/www/html | ||
| fi | ||
| if [ -n "$TZ"]; then | ||
| cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
| fi | ||
| exec "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| FROM php:7.0-fpm-alpine | ||
| # set recommended PHP.ini settings | ||
| # see https://secure.php.net/manual/en/opcache.installation.php | ||
| RUN { \ | ||
| echo 'opcache.memory_consumption=128'; \ | ||
| echo 'opcache.interned_strings_buffer=8'; \ | ||
| echo 'opcache.max_accelerated_files=4000'; \ | ||
| echo 'opcache.revalidate_freq=60'; \ | ||
| echo 'opcache.fast_shutdown=1'; \ | ||
| echo 'opcache.enable_cli=1'; \ | ||
| } > /usr/local/etc/php/conf.d/opcache-recommended.ini | ||
| # Install PHP extensions | ||
| # https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html | ||
| RUN set -ex \ | ||
| && apk update \ | ||
| && apk add build-base python-dev py-pip jpeg-dev jpeg \ | ||
| libldap openldap-dev zlib zlib-dev \ | ||
| freetype freetype-dev libjpeg-turbo libjpeg-turbo-dev \ | ||
| postgresql-dev libmcrypt-dev libmcrypt libpng-dev libpng \ | ||
| autoconf make g++ gcc git file gnupg re2c icu icu-dev tzdata \ | ||
| && docker-php-ext-configure gd \ | ||
| --with-freetype-dir=/usr/include/ \ | ||
| --with-png-dir=/usr/include \ | ||
| --with-jpeg-dir=/usr/include \ | ||
| && NPROC=$(getconf _NPROCESSORS_ONLN) \ | ||
| && docker-php-ext-install -j${NPROC} gd \ | ||
| && docker-php-ext-install exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && docker-php-ext-enable gd exif intl mbstring mcrypt opcache \ | ||
| pdo_mysql pdo_pgsql pgsql zip ldap \ | ||
| && pecl install APCu-5.1.6 \ | ||
| && git clone https://github.com/phpredis/phpredis.git \ | ||
| && cd phpredis \ | ||
| && git checkout php7 \ | ||
| && phpize \ | ||
| && ./configure \ | ||
| && make && make install \ | ||
| && cd .. \ | ||
| && rm -rf phpredis \ | ||
| && docker-php-ext-enable redis apcu \ | ||
| && apk del autoconf make g++ gcc git py-pip zlib-dev \ | ||
| jpeg-dev libmcrypt-dev libpng-dev openldap-dev \ | ||
| freetype-dev libjpeg-turbo-dev \ | ||
| && rm -rf /var/cache/apk/* | ||
| VOLUME /var/www/html | ||
| ENV NEXTCLOUD_VERSION 9.0.57 | ||
| RUN curl -fsSL -o nextcloud.tar.bz2 \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \ | ||
| && curl -fsSL -o nextcloud.tar.bz2.asc \ | ||
| "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc" \ | ||
| && export GNUPGHOME="$(mktemp -d)" \ | ||
| # gpg key from https://nextcloud.com/nextcloud.asc | ||
| && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A \ | ||
| && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \ | ||
| && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \ | ||
| && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \ | ||
| && rm nextcloud.tar.bz2 | ||
| COPY docker-entrypoint.sh /entrypoint.sh | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
| CMD ["php-fpm"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/ash | ||
| set -e | ||
| if [ ! -e '/var/www/html/version.php' ]; then | ||
| tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - | ||
| chown -R www-data /var/www/html | ||
| fi | ||
| if [ -n "$TZ"]; then | ||
| cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
| fi | ||
| exec "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you should use
update.shto generate the Dockerfiles and update.travis.ymlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I've been working on this yesterday.