├── .gitignore ├── Dockerfile ├── README.md └── htdocs ├── hello-world.html ├── index.html └── logs └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | /htdocs/logs/* 2 | !/htdocs/logs/.gitignore 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM httpd:latest 2 | 3 | RUN apt-get update && apt-get install -y wget make gcc 4 | 5 | RUN wget https://museum.php.net/php1/php-108.tar.gz -O /tmp/php-108.tar.gz 6 | 7 | RUN tar xfz /tmp/php-108.tar.gz 8 | 9 | RUN echo '#define ROOTDIR "/usr/local/apache2/htdocs"' > php/config.h 10 | 11 | RUN mkdir htdocs/logs 12 | 13 | RUN cd php && make 14 | 15 | RUN cp php/*.cgi cgi-bin 16 | 17 | RUN chmod u+s cgi-bin/php*.cgi 18 | 19 | RUN sed -i.bak 's/#LoadModule cgi/LoadModule cgi/g' conf/httpd.conf 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PHP 1 Docker Image 2 | ================== 3 | 4 | Basic Docker image which provides an installation of PHP in version 1.0.8 5 | 6 | Getting started 7 | --------------- 8 | 9 | 1. Clone repositoy 10 | 11 | ``` 12 | $ git clone https://github.com/jaem3l/php1-docker-image.git 13 | $ cd php1-docker-image 14 | ``` 15 | 16 | 2. Build Docker image 17 | 18 | ``` 19 | $ docker build -t php1 . 20 | ``` 21 | 22 | 2. Start container 23 | 24 | ``` 25 | docker run -dit -p 8080:80 --name php1cont -v $(pwd)/htdocs:/usr/local/apache2/htdocs/ php1 26 | ``` 27 | 28 | 3. See PHP 1 in action 29 | 30 | - http://localhost:8080/cgi-bin/phpl.cgi?version 31 | - http://localhost:8080/cgi-bin/phpl.cgi?index.html 32 | 33 | Resources 34 | --------- 35 | 36 | - [Release notes of PHP 1.0 in 1995](https://groups.google.com/forum/#!msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ) by Rasmus Lerdorf 37 | - Learn more about [the history of PHP](http://php.net/manual/en/history.php.php) 38 | - Check out old versions of PHP [at the museum](https://museum.php.net) 39 | -------------------------------------------------------------------------------- /htdocs/hello-world.html: -------------------------------------------------------------------------------- 1 |