Listing 1. PHP Box # PHP Box # # VERSION 1.0 # use centos base image FROM centos:6.4 # specify the maintainer MAINTAINER Dirk Merkel, dmerkel@vivantech.com # update available repos RUN wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm; rpm -Uvh epel-release-6-8.noarch.rpm # install some dependencies RUN yum install -y curl git wget unzip # install Apache httpd and dependencies RUN yum install -y httpd # install PHP and dependencies RUN yum install -y php php-mysql # general yum cleanup RUN yum install -y yum-utils RUN package-cleanup --dupes; package-cleanup --cleandupes; yum clean -y all # expose mysqld port EXPOSE 80 # the command to run CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]