It is recommended to use the configuration file in the form of a data volume and replace the original configuration in the container, including the PHP extension. You can create a new temporary container, compile the extension and export it to the host, and then mount it into the lnmp container through mounting. In the directory, just specify the corresponding directory and file in the configuration of php.ini.
It is not recommended to modify the configuration after entering the container and then submit it. The process of modifying the configuration again is very cumbersome.
Use commands like
docker run -it -u root 镜像名 /bin/bash
to change itAfter making the changes
exit
ExitThen
docker commit <container ID> 新的镜像名
submit your imageIt is recommended to use the configuration file in the form of a data volume and replace the original configuration in the container, including the PHP extension. You can create a new temporary container, compile the extension and export it to the host, and then mount it into the lnmp container through mounting. In the directory, just specify the corresponding directory and file in the configuration of php.ini.
It is not recommended to modify the configuration after entering the container and then submit it. The process of modifying the configuration again is very cumbersome.
It is recommended that you repackage the new image based on it, and modify or overwrite the original configuration file.
Example:
Owner, I am a newbie.
Looking for a mirror of lamp or lnmp