by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

D-Laravel has provided a built php image, if you need to adjust it yourself and build your own dedicated image is quite simple.

1. First, enter dockerfiles/fpm in D-Laravel , and select the PHP version you want to build, such as 7.2.
The command is as follows:
cd dockerfiles/fpm/7.2

2. You can adjust the PHP extensions to be installed according to your own needs.
If you want to know about PHP's Dockerfile configuration, you can refer to the official link below:
https://hub.docker.com/_/php/

Example: PECL extension package installation.

3. When a new version of the PHP image is released, we can actually simply adjust the version number on the Dockerfile to build the latest version of the PHP fpm image.
E.g:
Original:
FROM php:7.2.1-fpm
changed to
FROM php:7.2.2-fpm

4. After the modification is completed, you can execute the command to perform the Build Image action.
E.g:
docker build -t myimage .

5. Remember to update our docker-compose.yml file, and change the PHP image to the image you built.
docker-compose.yml

Tags: dlaravel

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


dlaravel

D-Laravel test domain name *.dev changed to *.test

Since Google Chrome 63 will forcibly convert the domain name of *.dev to https, the domain name of the new version of D-Laravel will be changed to *.test. This article explains how to update.

dlaravel

Super easy to use HTML to PDF kit mpdf introduction

During development, will it be necessary to output HTML to PDF? This video introduces how to output PDF on the screen through the mpdf library of php.

php,docker,dlaravel

A brief introduction to the phpenv container environment I built

I don't have time to shoot an introduction video, so I'll just grab some pictures and introduce the container environment deviny/phpenv I use. https://github.com/DevinY/phpenvphpenv can be regarded as an evolutionary version of my previous D-Laravel open source project, conceptually extending the use of many Dlaravel operation methods. The update of the container tends to be controlled by the user to build his own image, so I am not very good at changing the version number. In fact, the php version number of D-Laravel seems to have not been changed for a long time:p