Skip to content
Open
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
6 changes: 3 additions & 3 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ RUN set -ex; \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.14; \
pecl install geoip-1.1.1; \
pecl install redis-3.1.6; \
pecl install APCu-%%APCU_VERSION%%; \
pecl install geoip-%%GEOIP_VERSION%%; \
pecl install redis-%%REDIS_VERSION%%; \
\
docker-php-ext-enable \
apcu \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ RUN set -ex; \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.14; \
pecl install geoip-1.1.1; \
pecl install redis-3.1.6; \
pecl install APCu-%%APCU_VERSION%%; \
pecl install geoip-%%GEOIP_VERSION%%; \
pecl install redis-%%REDIS_VERSION%%; \
\
docker-php-ext-enable \
apcu \
Expand Down
29 changes: 29 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ latest="$(
| tail -1
)"

apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
)"

# Todo: check for 4.x compatibility
redis_version="$(
git ls-remote --tags https://github.com/phpredis/phpredis.git \
| cut -d/ -f3 \
| grep -viE '[a-z]' \
| tr -d '^{}' \
| grep -E '^3\.' \
| sort -V \
| tail -1
)"

declare -A pecl_versions=(
[APCu]="$apcu_version"
[geoip]="1.1.1" # Todo: fetch latest tag from SVN repo
[redis]="$redis_version"
)

set -x

for variant in apache fpm fpm-alpine; do
Expand All @@ -31,6 +57,9 @@ for variant in apache fpm fpm-alpine; do
sed -ri -e '
s/%%VARIANT%%/'"$variant"'/;
s/%%VERSION%%/'"$latest"'/;
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g;
s/%%GEOIP_VERSION%%/'"${pecl_versions[geoip]}"'/g;
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
s/%%CMD%%/'"${cmd[$variant]}"'/;
' "$variant/Dockerfile"
done