Docker runs php5.3

needs to run a php5 3 program on the Ubuntu server, but it is already equipped with php7.1. Do not want to install 5.x environment, afraid of problems, want to run in docker. Should it be all right to ask? I"m not familiar with docker. Only know the basic commands.

Mar.31,2021

Yes, you can directly pull the php image.


mainly to run thinkphp3.2 but also to connect mysql


docker runtime php5.x environment is possible

however, you need to map the directory of your local project to the docker php5.x container
docker pull php:5.3

.

as for the tp3.2 with mysql, you can map the host private network ip address plus port 3306 to the container.
but this is not a good idea

the correct thing is to create a mysql in docker and then set php and mysql to be on the same network segment.

as the above brother said, it is more convenient to do it with docker-compose.

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-1b38a7e-2c129.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-1b38a7e-2c129.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?