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:

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.
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.
docker build -t myimage .

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

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


How to configure HTTPS on nginx to get an SSL A+ score from Qualys

This article describes how to adjust the ssl settings of nginx so that the website can obtain an SSL report and get an A+ rating. Here I am using letsencrypt free credentials. As long as you use the official Docker nginx new version image preset by D-Laravel, you should be able to achieve the same effect as mine. You can check your host SSL settings through the following.


D-Laravel's sublime plug-in can be installed by Package Control.

Mac or Linux users can now install the D-Laravel alias package from Sublime3's package control. Through D-Laravel alias, we can execute artisan and composer commands in the container in an easier way. In the docker environment, do you want to use composer to install the package? You don’t need to enter the container, or set the ce alias of composer, and you can execute it directly in sublime.


Description of .env.example file on D-Laravel

This article explains about the .env settings on D-Laravel MYSQL_ROOT_PASSWORD=secret LARAVEL_INSTALLER='container' DOCKER_SERVICES='docker-compose.yml service/redis.yml'