mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-19 18:36:09 +02:00
Merge c5c8eccbee
into b9bae3112c
This commit is contained in:
commit
9a3cbf6cfb
7 changed files with 245 additions and 0 deletions
23
.travis.yml
Normal file
23
.travis.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
language: bash
|
||||||
|
services: docker
|
||||||
|
|
||||||
|
env:
|
||||||
|
- VARIANT=php5.6/fpm
|
||||||
|
- VARIANT=php7.0/alpine-fpm
|
||||||
|
|
||||||
|
install:
|
||||||
|
- git clone https://github.com/docker-library/official-images.git ~/official-images
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- env | sort
|
||||||
|
- cd "$VARIANT"
|
||||||
|
- slash='/'; image="nextcloud:${VARIANT//$slash/-}"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- docker build -t "$image" .
|
||||||
|
- ~/official-images/test/run.sh "$image"
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- docker images
|
||||||
|
|
||||||
|
# vim:set et ts=2 sw=2:
|
67
10.0/alpine-fpm/Dockerfile
Normal file
67
10.0/alpine-fpm/Dockerfile
Normal file
|
@ -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 10.0.3
|
||||||
|
|
||||||
|
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"]
|
13
10.0/alpine-fpm/docker-entrypoint.sh
Executable file
13
10.0/alpine-fpm/docker-entrypoint.sh
Executable file
|
@ -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 "$@"
|
67
11.0/alpine-fpm/Dockerfile
Normal file
67
11.0/alpine-fpm/Dockerfile
Normal file
|
@ -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.1
|
||||||
|
|
||||||
|
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"]
|
13
11.0/alpine-fpm/docker-entrypoint.sh
Executable file
13
11.0/alpine-fpm/docker-entrypoint.sh
Executable file
|
@ -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 "$@"
|
58
php5.6/fpm/Dockerfile
Normal file
58
php5.6/fpm/Dockerfile
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
FROM php:5.6-fpm
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
bzip2 \
|
||||||
|
libcurl4-openssl-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libldap2-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libpng12-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html
|
||||||
|
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||||
|
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
|
||||||
|
&& docker-php-ext-install gd exif intl mbstring mcrypt ldap mysql opcache pdo_mysql pdo_pgsql pgsql zip
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# PECL extensions
|
||||||
|
RUN set -ex \
|
||||||
|
&& pecl install APCu-4.0.10 \
|
||||||
|
&& pecl install memcached-2.2.0 \
|
||||||
|
&& pecl install redis-2.2.8 \
|
||||||
|
&& docker-php-ext-enable apcu redis memcached
|
||||||
|
|
||||||
|
ENV NEXTCLOUD_VERSION 10.0.1
|
||||||
|
VOLUME /var/www/html
|
||||||
|
|
||||||
|
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"]
|
|
@ -6,4 +6,8 @@ if [ ! -e '/var/www/html/version.php' ]; then
|
||||||
chown -R www-data /var/www/html
|
chown -R www-data /var/www/html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$TZ"]; then
|
||||||
|
cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
Loading…
Add table
Reference in a new issue