ByteInternet / hypernode-docker

Fast and easy Docker for Magento development
https://community.hypernode.io/hypernode-docker
35 stars 8 forks source link

PHP 8.1 build #57

Closed peterjaap closed 2 years ago

peterjaap commented 2 years ago

PHP 8.1 is only 10 days away! :partying_face:

Would be nice to have a built container for 8.1 as soon as possible :) Magento 2.4.4 should be 8.1 compatible when it comes out (the current versions already work on 8.1, see https://mobile.twitter.com/MarkShust/status/1458908952440324096

vdloo commented 2 years ago

Hey @peterjaap, we kind of do a 'feature freeze' around the black friday / holiday period where we don't really like touching the production apt repositories too much if not strictly needed so I'm kind of apprehensive to reprepro packages that also touch other PHP versions (like php-redis and such) so it's kind of too big of a hassle to build a proper container for that PHP version just yet. But we did build the PHP 8.1 packages and I put most of them in the 'test' component of our apt repository. If you're looking to experiment you could get those packages from that test component (in your Dockerfile or just in the shell) with something like this:

sed -i 's/main hypernode/main hypernode test/g' /etc/apt/sources.list
apt-get update
apt-get install -y php8.1-common php8.1-fpm php8.1 php8.1-cli php8.1-gd php8.1-bcmath php8.1-curl php8.1-gd php8.1-imap php8.1-imap php8.1-intl php8.1-mbstring php8.1-mysql php8.1-ldap php8.1-pgsql php8.1-pspell php8.1-soap php8.1-tidy php8.1-xml php8.1-zip php8.1-odbc php8.1-gettext php8.1-bz2 php8.1-igbinary php8.1-redis php8.1-imagick
cp /etc/php/8.0/fpm/php.ini /etc/php/8.1/fpm/php.ini
cp /etc/php/8.0/cli/php.ini /etc/php/8.1/cli/php.ini
cp /etc/php/8.0/cli/conf.d/opcache.ini /etc/php/8.1/cli/conf.d/opcache.ini
cp /etc/php/8.0/fpm/conf.d/opcache.ini /etc/php/8.1/fpm/conf.d/opcache.ini
cp /etc/php/8.0/cli/conf.d/magweb.ini /etc/php/8.1/cli/conf.d/magweb.ini
cp /etc/php/8.0/fpm/conf.d/magweb.ini /etc/php/8.1/fpm/conf.d/magweb.ini
cp /etc/php/8.0/fpm/conf.d/fpminspector.ini /etc/php/8.1/fpm/conf.d/fpminspector.ini
cp /etc/php/8.0/fpm/php-fpm.conf /etc/php/8.1/fpm/php-fpm.conf
sed -i 's/8.0/8.1/g' /etc/php/8.1/fpm/php-fpm.conf
cp /etc/php/8.0/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/www.conf
sed -i 's/8.0/8.1/g' /etc/php/8.1/fpm/pool.d/www.conf
apt-get install -y --reinstall php-ext-snappy php-hypernode php-apcu php-amqp
jq ".php.version = 8.1" /etc/hypernode/magweb.json > /tmp/magweb.json
mv /tmp/magweb.json /etc/hypernode/magweb.json
bash /etc/my_init.d/60_restart_services.sh
echo "<? phpinfo();" > /data/web/public/index.php

php81_002

vdloo commented 2 years ago

@peterjaap the PHP 8.1 images are now available:

image

docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql56:latest
docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql57:latest
docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql80:latest (still building but should be ready in a couple of minutes)
peterjaap commented 2 years ago

Woop!