Dockerfile:lamp:0.1
vim Dockerfile
FROM centos:7.3.1611
Run yum -y install httpd
EXPOSE 80
docker build -t fcj/lamp .
mkdir -p /data/www
docker run -d -p 80:80 -v /data/www:/var/www/html fcj/lamp httpd -D FOREGROUND
echo "Hi" > /data/www/index.html
curl http://localhost/
Dockerfile:lamp:0.2
vim Dockerfile
FROM centos:7.3.1611
Run yum -y install httpd php
EXPOSE 80
docker build -t fcj/lamp .
docker run -d -p 80:80 -v /data/www:/var/www/html fcj/lamp httpd -D FOREGROUND
echo "<?php phpinfo(); ?>" > /data/www/phpinfo.php
curl http://localhost/phpinfo.php