# Base image for build
FROM php:8.1-cli
# Update packages
RUN apt-get update && apt-get upgrade -y
# Install mount utility (for Azure File Share)
RUN apt-get install -y --no-install-recommends cifs-utils
# Update PHP memory limit for Magento
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
RUN sed -i "s#memory_limit =.#memory_limit = 1024M#g" /usr/local/etc/php/php.ini
RUN sed -i "s#max_execution_time =.#max_execution_time = 18000#g" /usr/local/etc/php/php.ini
# Install PHP Extensions required by Symfony 5 (gd, zip)
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
&& docker-php-ext-configure gd --with-freetype --with-jpeg
&& docker-php-ext-install -j$(nproc) gd
RUN apt-get install -y --no-install-recommends libzip-dev zip
&& docker-php-ext-install zip
# Install PHP Extensions required by Magento (intl, soap, bcmath, pdo_mysql, xsl, sockets)
RUN apt-get install -y --no-install-recommends libicu-dev
&& docker-php-ext-configure intl
&& docker-php-ext-install intl
RUN apt-get install -y libxml2-dev
&& docker-php-ext-install soap
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install pdo pdo_mysql
RUN apt-get install -y --no-install-recommends libxslt-dev libgcrypt-dev
&& docker-php-ext-install -j$(nproc) xsl
RUN docker-php-ext-install sockets
# Install Composer 2 to compile backend
RUN apt-get install -y --no-install-recommends wget unzip
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer
&& unlink composer-setup.php
# Install Node 16
RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
&& bash nodesource_setup.sh && apt install nodejs
&& unlink nodesource_setup.sh
# Install Yarn to compile frontend
RUN npm config set strict-ssl false
&& npm i -g yarn
&& npm cache clean --force
# Install Docker
RUN apt-get install -y --no-install-recommends docker.io && service docker start
# Install Azure CLI
RUN apt-get install -y --no-install-recommends curl jq && curl -sL https://aka.ms/InstallAzureCLIDeb | bash
# clean install packages from image
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
Content type
Image
Digest
sha256:7f75ecc52…
Size
500 MB
Last updated
over 3 years ago
docker pull wunderman/php81_yarn_docker_azure:2.0