Skip to content

Instantly share code, notes, and snippets.

@horitaku1124
Created August 20, 2017 05:34
Show Gist options
  • Save horitaku1124/3d08213c061d2bec1479baa92555e01b to your computer and use it in GitHub Desktop.
Save horitaku1124/3d08213c061d2bec1479baa92555e01b to your computer and use it in GitHub Desktop.
CentOS6 pre-installed PHP5.1.6
FROM centos:centos6
RUN yum install -y gcc make flex patch bzip2 libxml2-devel
RUN yum -y install httpd httpd-devel
COPY php-5.1.6.tar.bz2 /root
WORKDIR /root
RUN tar xvf php-5.1.6.tar.bz2
WORKDIR /root/php-5.1.6
RUN ./configure \
--with-apxs2 \
--enable-mbstring \
&& make && make install && make clean
RUN echo 'AddType application/x-httpd-php .php' >> /etc/httpd/conf/httpd.conf
RUN echo 'DirectoryIndex index.php' >> /etc/httpd/conf/httpd.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment