I want to run legacy php 5.3 apps on centos 7. Since there is no php 5.3 build on centos 7, docker container looks like a preferred option. I referred to this article to build a docker container but I am unable to access the php web pages from port 9003 in local host. The following are places where I may need help.
I want to have apache and php files on local and only want to run php on the container..
help is greatly appreciated
The container runs fine but when I run localhost:9003 on the browser I am not able to serve php pages from /var/www/html
You need to expose the ports by adding -p 9003:9003
to the run command.
Try run docker with network parameter like --network=<NETWORK>
. looking for available network use command docker network ls
.
i advise to use the bridge network mode:
docker --network=bridge
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.