Docker php fpm for Magento 2.4 (php 7.4)
For a customer I needed to have a quick test env on my machine, so I just took the dump and the code of the server and spun up some docker container like a nginx, a mysql db, an elasticsearch instance and a php fpm container. The problem here was the missing dependencies for some stuff Magento 2.4. need to run properly. Thus I created a small Dockerfile (and I'm definitely not the only one) to extent the php 7.4. fpm image and here it is :)
FROM php:7.4-fpm
RUN apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libicu-dev libxml2-dev libxslt-dev libzip-dev
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd pdo_mysql bcmath intl soap sockets xsl zip
RUN docker-php-ext-enable gd pdo_mysql bcmath intl soap sockets xsl zip