How to set up the Jenkins php environment in docker?

problem description

my Jenkins was started with docker, and now I want to use it to execute composer install-- no-dev command to install dependencies. I found that there is no plug-in to install PHP (there is a plug-in called Phing, which is used to perform a series of build tasks, but does not provide php ). I compiled PHP on the host, then mounted / usr/local/bin/php into the container, and found

.
php: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

it seems that the shared library has not been found. How do you do it?

May.27,2022

php > installed by the host cannot be used inside the container. Extensions and other things exist in the host, but they do not exist in the corresponding place inside the container. Either you mount the extension directory to the specified location inside the container again and again according to the error message, or install php completely inside the container. Personally, I think it's best to install php in the container, and then update the base image.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c49d-2c2e8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c49d-2c2e8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?