Don Udugala

PHP Programmer

Full Stack Developer/Magento Developer

Web Solution Architect

Photographer

Love Python, Node, React

0

No products in the cart.

Don Udugala

PHP Programmer

Full Stack Developer/Magento Developer

Web Solution Architect

Photographer

Love Python, Node, React

Blog Post

Installing Magento 2 in Php 8.1 docker-compose

Installing Magento 2 in Php 8.1 docker-compose

This is a quick article about installing Magento 2 in docker-compose with Php 8.1.

In this docker-compose setup I have used PHP 8.1 fpm, Mysql Image, phpMyadmin, elasticsearch8, Memcache, and apache to install Magento 2.4.5.

Difference between my old PHP 7.4 and this one is how I’ve installed the Magento 2 required libraries.


RUN pecl install xdebug \
memcache \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-enable memcache \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl

RUN install-php-extensions bcmath gd mysqli pdo_mysql pdo_pgsql redis uuid zip sockets opcache gettext gmp sysvmsg soap xsl exif ldap sysvsem sysvshm

if you look at the docker/php/dockerfile. You can see, two different ways how I have applied the libraries.

Install docker folder outside of the Magento 2 install directory and create mysql and mysqld directories to support mysql database.

You can use PHPMyAdmin to manage your mysql. This docker-compose file is ideal for setup your local Magento 2 installation with docker-compose.

You can download this repository from my github

https://github.com/theiconnz/magento2php81docker/

Checkout my other video on php7.4 docker-compose setup.

Taggs: