As most of us already know, PHP7.4 became production ready few days back. It comes with some cool features like:
- Short Arrow Functions
- Spread Operator for Arrays
- Typed Properties
- Opcache Preloading
... and much more! We can't thank the team behind PHP enough!
If you are a PHP developer or PHP enthusiast you must be excited already to get hands on with PHP7.4.
If you want to give it a try with ease - the docker way, then I have created a docker image with not just PHP7.4 but tons of common and useful PHP extensions. Check it out.
docker pull adhocore/phpfpm:7.4
Docker PHP FPM on alpine 3.12/3.13 with PHP7.4.20 with 86 extensions and PHP8.0.7 with 78 cool extensions (you can disable not necessary ones easily)
Docker PHP FPM with lean alpine base. The download size is just about ~150MB.
It contains PHP8.0.7 with plenty of common and useful extensions.
You can also continue using
adhocore/phpfpm:7.4 for PHP7.4.20.
If you are looking for a complete local development stack then check
It comes prepackaged with
composer - both v1 and v2
composer2 command for v2 and
composer for v1.
To pull latest image:
docker pull adhocore/phpfpm:8.0 # or for alpine 3.13 docker pull adhocore/phpfpm:8.0-alp3.13 # or for php 7.4 docker pull adhocore/phpfpm:7.4 # or for php 7.4 on alpine 3.13 docker pull adhocore/phpfpm:7.4-alp3.13
To use in docker-compose
# ./docker-compose.yml version: '3' services: phpfpm: image: adhocore/phpfpm:8.0 container_name: phpfpm volumes: - ./path/to/your/app:/var/www/html # Here you can also volume php ini settings # - /path/to/zz-overrides:/usr/local/etc/php/conf.d/zz-overrides.ini ports: - 9000:9000 environment: # ...
If you want a full docker based LEMP stack with PHP7.4, then I have got you covered as well.
docker run -p 8080:80 -v $(pwd):/var/www/html --name lemp -d adhocore/lemp:7.4 then visit localhost:8080. There you have dockerized LEMP stack with PHP7.4.
A single container LEMP complete fullstack with latest release of PHP7.4.20 and 8.0.7 and MySQL, nginx, PostgreSQL, phalcon, swoole, mailcatcher, beanstalkd, elasticsearch, memcached, redis, adminer and all you ever need; on top alpine3.12
adhocore/lemp is a minimal single container LEMP full stack for local development.
If you want to use PHP7.4 on LEMP stack then head over to
It is quick jumpstart for onboarding you into docker based development The download size is just about ~360MB which is tiny considering how much tools and stuffs it contains.
The docker container
adhocore/lemp is composed of:
*: It is actually MariaDB 10.4.17.
Install docker in your machine…
Oh and both the images are built on top alpine base so should be slimmer.