Command to run :
docker run -itd --name lamp -p 80:80 -v /root/centos/:/var/www/html rico1918/lamp
And you can use this command to create a mariadb container which share the network with lamp container , so you can use lo IP to access database :
docker run -itd -e MARIADB_ROOT_PASSWORD=redhat --net=container:lamp mariadb
docker pull rico1918/lamp:latest