Skip to content

Instantly share code, notes, and snippets.

@nobiki
Last active November 6, 2018 11:45
Show Gist options
  • Save nobiki/12b627f18df15e43e9a4654bd1cfc5be to your computer and use it in GitHub Desktop.
Save nobiki/12b627f18df15e43e9a4654bd1cfc5be to your computer and use it in GitHub Desktop.
FROM centos:7
MAINTAINER Naoaki Obiki
RUN yum update -y
RUN yum group install -y 'Development Tools'
RUN yum install -y libxml2-devel wget
RUN wget "http://jp2.php.net/get/php-7.0.9.tar.gz/from/this/mirror" -P /usr/local/src/
RUN mv /usr/local/src/mirror /usr/local/src/php-7.0.9.tar.gz
RUN wget "http://pecl.php.net/get/pthreads-3.1.6.tgz" -P /usr/local/src/
RUN cd /usr/local/src/ && tar zxvf php-7.0.9.tar.gz
RUN cd /usr/local/src/ && tar zxvf pthreads-3.1.6.tgz
RUN mv /usr/local/src/pthreads-3.1.6 /usr/local/src/php-7.0.9/ext/pthreads
RUN cd /usr/local/src/php-7.0.9 && ./buildconf --force
RUN cd /usr/local/src/php-7.0.9 && ./configure --enable-debug --enable-maintainer-zts --enable-pthreads --enable-mbstring --prefix=/usr --with-config-file-path=/etc
RUN cd /usr/local/src/php-7.0.9 && make
RUN cd /usr/local/src/php-7.0.9 && make install
RUN cp /usr/local/src/php-7.0.9/php.ini-development /etc/php.ini
RUN echo 'include_path = "/usr/lib/php/"' >> /etc/php.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment