A base project that serves for Laravel development projects
Just run the docker build command informing the folder where the Dockerimage is located and informing the version in the TAG.
$ docker build . --file php/7.4/Dockerfile --tag anave/php-laravel:7.4After building the image, we will publish it on the Docker hub, for that use the command below informing the images built previously.
$ docker push anave/php-laravel:7.4It uses the php:8.1-fpm-alpine base provided by the official PHP repository on the Docker HUB.
It uses Alpine Linux as a development base.
Mysql, Sqlite, LibPng, Curl, XML, Zip and others are already installed.
The PHP Extensions
pdo_mysqlpdo_sqlitembstringexifpcntlbcmathgdcurlzipintlxdebugredis
dockerize is already installed.
and Composer in the latest version.
To use the image with OPCache active for production, just override the environment variable when running the image.
PHP_OPCACHE_VALIDATE_TIMESTAMPS = 1The variables that are enabled for override are:
ENV PHP_OPCACHE_ENABLE=1
ENV PHP_OPCACHE_REVALIDATE_FREQ=0
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS=0
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES=10000
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=192
ENV PHP_OPCACHE_MAX_WASTED_PERCENTAGE=10
ENV PHP_OPCACHE_INTERNED_STRINGS_BUFFER=16