Skip to content
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

adjust for php 8.2 and 8.3 #79

Merged
merged 4 commits into from
Apr 30, 2024
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
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ ENV ENABLE_GCP="${ENABLE_GCP:-0}" \
# ssmtp: synchronouse mailer, very handy in CLI scripts on docker
ENV PATH="${PATH}:${WORKDIR}/docker/bin" \
BUILD_PACKAGES="ccache build-essential unzip zip" \
SYSTEM_PACKAGES="ssmtp busybox-static netcat vim less tree libtcmalloc-minimal4 git postgresql-client gettext nginx apt-transport-https" \
SYSTEM_PACKAGES="ssmtp busybox-static netcat-traditional vim less tree libtcmalloc-minimal4 git postgresql-client gettext nginx apt-transport-https" \
JESSIE_PACKAGE_MAP="libpng16-16:libpng12-0 libicu57:libicu52 libmagickwand-6.q16-3:libmagickwand-6.q16-2 libmagickcore-6.q16-3:libmagickcore-6.q16-2 npm:" \
BUSTER_PACKAGE_MAP="libicu57:libicu63 libmagickwand-6.q16-3:libmagickwand-6.q16-6 libmagickcore-6.q16-3:libmagickcore-6.q16-6 ssmtp:msmtp" \
BULLSEYE_PACKAGE_MAP="libicu57:libicu67 libmagickwand-6.q16-3:libmagickwand-6.q16-6 libmagickcore-6.q16-3:libmagickcore-6.q16-6 ssmtp:msmtp" \
BOOKWORM_PACKAGE_MAP="libicu57:libicu72 libmagickwand-6.q16-3:libmagickwand-6.q16-6 libmagickcore-6.q16-3:libmagickcore-6.q16-6 ssmtp:msmtp libldap-2.4-2:libldap-2.5-0" \
ENABLE_NEWRELIC="false"

# NGINX
Expand All @@ -60,7 +62,7 @@ ENV PHP="php" \
NEWRELIC_PHP_VERSION="php5-8.0.0.204" \
PHP_EXTENSIONS_STARTUP_ONLY="xdebug APCu imagick redis" \
PHP_EXTENSIONS_STARTUP_ENABLE="" \
PHP_EXTENSIONS="bcmath bz2 gd gmp intl json mbstring opcache dom curl pgsql pdo_pgsql pdo_mysql ldap soap zip xdebug-3.1.5 imagick-3.7.0 redis-5.3.7 APCu" \
PHP_EXTENSIONS="bcmath bz2 gd gmp intl json mbstring opcache dom curl pgsql pdo_pgsql pdo_mysql ldap soap zip xdebug imagick-3.7.0 redis-5.3.7 APCu" \
PHP_BUILD_PACKAGES="re2c libmagickwand-6.q16-dev libbz2-dev libldap2-dev libgmp-dev libicu-dev libpq-dev libpq-dev libreadline6-dev libedit-dev libxml2-dev libcurl4-openssl-dev zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev" \
SYSTEM_PACKAGES="${SYSTEM_PACKAGES} libldap-2.4-2 libpng16-16 libicu57 libjpeg62-turbo libfreetype6 libmagickwand-6.q16-3 libmagickcore-6.q16-3 libzip4" \
PHP_INI_DIR="/usr/local/etc/php" \
Expand Down
6 changes: 4 additions & 2 deletions bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ WORKDIR=$(realpath $0 | xargs dirname | xargs dirname)

export VERSION=$(cat $WORKDIR/VERSION)
export IMAGE_NAME="claranet/php"
FROM_IMAGE_TAGS="7.1.33-fpm-stretch 7.2.34-fpm-stretch 7.3.28-fpm-stretch"
LATEST_IMAGE="7.3.28-fpm-stretch"
#FROM_IMAGE_TAGS="8.2.18-fpm-bookworm 8.3.6-fpm-bookworm"
FROM_IMAGE_TAGS="8.2.18-fpm-bookworm"
LATEST_IMAGE="8.2.18-fpm-bookworm"
#LATEST_IMAGE="8.3.6-fpm-bookworm"

# Based on $GITHUB_HEAD_REF which is set fot pull requests
# and $RELEASE_VERSION which holds either the branch name or tag
Expand Down
5 changes: 3 additions & 2 deletions bin/image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -x
set -eo pipefail
WORKDIR=$(realpath $0 | xargs dirname | xargs dirname)

export FROM_IMAGE=${FROM_IMAGE:-php:8.1.7-fpm-buster}
PHP_VERSION=${PHP_VERSION:-8.1.7}
export FROM_IMAGE=${FROM_IMAGE:-php:8.2.18-fpm-bookworm}
PHP_VERSION=${PHP_VERSION:-8.2.18}
VERSION=${VERSION:-`cat $WORKDIR/VERSION`}
IMAGE_NAME=${IMAGE_NAME:-local/claranet/php}
IMAGE_TAG=${IMAGE_TAG:-$VERSION-php$PHP_VERSION}
Expand Down Expand Up @@ -41,6 +41,7 @@ case "$1" in
build_image ${IMAGE}
;;
test)
echo ${IMAGE}
test_image ${IMAGE}
;;
publish)
Expand Down
18 changes: 18 additions & 0 deletions docker/common.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,24 @@ install_packages() {
done
fi

if [ "$DIST" = "bullseye" ]; then
sectionText "Found bullseye distribution, map package names"
for r in $BULLSEYE_PACKAGE_MAP; do
local from=`echo "$r" | cut -d: -f1`
local to=`echo "$r" | cut -d: -f2`
pkg_list=`echo "$pkg_list" | sed "s/$from/$to/g"`
done
fi

if [ "$DIST" = "bookworm" ]; then
sectionText "Found bookworm distribution, map package names"
for r in $BOOKWORM_PACKAGE_MAP; do
local from=`echo "$r" | cut -d: -f1`
local to=`echo "$r" | cut -d: -f2`
pkg_list=`echo "$pkg_list" | sed "s/$from/$to/g"`
done
fi

if [ -n "$pkg_list" ]; then
sectionText "Install $package_description: $pkg_list"
http_proxy=$PROXY eatmydata apt-get install $install_flags $pkg_list &>> $BUILD_LOG
Expand Down
2 changes: 1 addition & 1 deletion example/matomo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ${IMAGE}
ENV DOCUMENT_ROOT="${WORKDIR}" \
COMPRESS_FILE_PATHS="js"

ENV MATOMO_VERSION="3.5.1" \
ENV MATOMO_VERSION="5.0.3" \
MYSQL_HOST="mysql" \
MYSQL_USER="matomouser"

Expand Down
Loading