This is a basic PHP-FPM server with the base requirements for Magento 2. It is useful for development, test environments, and potentially production use. It is built on the latest PHP 7.4, and also includes Node.JS 14 LTS and NPM for compiling static assets, with the dependencies to build a compatible node-sass too.
To build this yourself:
FROM phpdockerio/php:7.4-fpm
WORKDIR /var/www/mage2
RUN apt-get update \
&& apt-get -y --no-install-recommends install php7.4-mysql php7.4-gd php7.4-imap php7.4-intl php7.4-mbstring php7.4-curl php7.4-json php7.4-simplexml php7.4-soap php7.4-bcmath php7.4-zip php7.4-redis unzip \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get -y --no-install-recommends install nodejs \
&& npm install -g npm \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN apt-get update \
&& apt-get -y install g++ build-essential python2 \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
docker buildx build --platform linux/amd64,linux/arm64 --tag alanaktion/mage2:php74 --push .
If you're using this with a CI environment like Bitbucket Pipelines, you may benefit from using an environment variable for your Composer keys used to download the Magento packages. For example:
COMPOSER_AUTH='{"http-basic":{"repo.magento.com":{"username":"000123","password": "456fff"}}}'
Content type
Image
Digest
Size
108.5 MB
Last updated
over 5 years ago
docker pull alanaktion/mage2