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.

Menu