Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Bump to php 7.2 (which is strongly encouraged by owncloud) #107

Merged
merged 1 commit into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions 10.0/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended")
# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
FROM php:7.0-apache
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM php:7.2-apache

RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
Expand All @@ -11,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
Expand All @@ -29,8 +31,6 @@ RUN set -ex; \
gd \
intl \
ldap \
mbstring \
mcrypt \
opcache \
pcntl \
pdo_mysql \
Expand Down
14 changes: 7 additions & 7 deletions 10.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended")
# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
FROM php:7.0-fpm
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM php:7.2-fpm

RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
Expand All @@ -11,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
Expand All @@ -29,8 +31,6 @@ RUN set -ex; \
gd \
intl \
ldap \
mbstring \
mcrypt \
opcache \
pcntl \
pdo_mysql \
Expand Down
10 changes: 6 additions & 4 deletions 9.1/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended")
# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM php:7.0-apache

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -29,7 +32,6 @@ RUN set -ex; \
gd \
intl \
ldap \
mbstring \
mcrypt \
opcache \
pcntl \
Expand Down
10 changes: 6 additions & 4 deletions 9.1/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended")
# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM php:7.0-fpm

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -29,7 +32,6 @@ RUN set -ex; \
gd \
intl \
ldap \
mbstring \
mcrypt \
opcache \
pcntl \
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended")
# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
FROM php:7.0-%%VARIANT%%
FROM php:%%VARIANT%%

RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
Expand Down Expand Up @@ -29,7 +26,6 @@ RUN set -ex; \
gd \
intl \
ldap \
mbstring \
mcrypt \
opcache \
pcntl \
Expand Down
31 changes: 26 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ declare -A cmd=(
[fpm]='php-fpm'
)

# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("*We strongly encourage you to migrate to PHP 7.2.")
# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0")
defaultPhpVersion='7.2'
declare -A phpVersion=(
[9.1]='7.0'
)

generated_warning() {
cat <<-EOH
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

EOH
}

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
#Supported Versions found from Production Channel https://owncloud.org/release-channels/
versions=( "$@" )
Expand Down Expand Up @@ -47,20 +65,23 @@ for version in "${versions[@]}"; do
echo "$version: $fullVersion"

for variant in apache fpm; do
sed -r \
-e 's/%%VARIANT%%/'"$variant"'/' \
{ generated_warning; cat Dockerfile.template; } > "$version/$variant/Dockerfile"
sed -ri \
-e 's/%%VARIANT%%/'"${phpVersion[$version]:-$defaultPhpVersion}-$variant"'/' \
-e 's/%%VERSION%%/'"$fullVersion"'/' \
-e 's/%%SHA256%%/'"$sha256"'/' \
-e 's/%%CMD%%/'"${cmd[$variant]}"'/' \
Dockerfile.template \
> "$version/$variant/Dockerfile"
"$version/$variant/Dockerfile"

if [ "$variant" = 'fpm' ]; then
sed -ri -e '/a2enmod/d' "$version/$variant/Dockerfile"
fi

if [[ "$version" != 9.* ]]; then
sed -ri -e '/^RUN ln.*docker-entrypoint.*backwards compat/d' "$version/$variant/Dockerfile"
sed -ri \
-e '/^RUN ln.*docker-entrypoint.*backwards compat/d' \
-e '/mcrypt/d' \
"$version/$variant/Dockerfile"
fi

travisEnv='\n - VERSION='"$version"' VARIANT='"$variant$travisEnv"
Expand Down