Skip to content

Instantly share code, notes, and snippets.

@shoyan
Created March 9, 2016 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoyan/605778a9ab864e94b796 to your computer and use it in GitHub Desktop.
Save shoyan/605778a9ab864e94b796 to your computer and use it in GitHub Desktop.
Dockerfile to build php5.2.
FROM ubuntu
MAINTAINER shoyan
USER root
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install build-essential
RUN apt-get -y install libxml2-dev
RUN apt-get -y install wget
RUN wget http://museum.php.net/php5/php-5.2.17.tar.gz
RUN tar -xf php-5.2.17.tar.gz
WORKDIR php-5.2.17
RUN wget -O php-5.4.5.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
# refs https://www.litespeedtech.com/support/forum/threads/solved-compile-php-5-2.6887/
RUN patch -p0 -b <./php-5.4.5.patch
RUN ./configure
RUN make
RUN make install
RUN php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment