diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 000000000000..5124ba39cef3 --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,17 @@ +FROM php:8.2-cli + +RUN apt-get update && \ + apt-get install -y git + +WORKDIR /var/www + +ADD https://api.github.com/repos/php/phd/git/refs/heads/master version-phd.json +ADD https://api.github.com/repos/php/doc-base/git/refs/heads/master version-doc-base.json + +RUN git clone --depth 1 https://github.com/php/phd.git && \ + git clone --depth 1 https://github.com/php/doc-base.git + +RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/local.ini + +CMD php doc-base/configure.php --disable-segfault-error && \ + php phd/render.php --docbook doc-base/.manual.xml --output=/var/www/en/output --package PHP --format xhtml diff --git a/.gitignore b/.gitignore index b2f1b48faafa..8e0450061c78 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ entities.*.xml +output diff --git a/README b/README index ba8bcb3f7975..734a28561eea 100644 --- a/README +++ b/README @@ -7,3 +7,9 @@ Please refer to the README file within the [doc-base repository](https://github. For information related to creating this setup, see: http://doc.php.net/tutorial/local-setup.php + +Running With Docker + +- Install Docker (https://docs.docker.com/get-docker/) +- Rebuild the documentation using `docker-compose up` +- Open output/php-chunked-xhtml/ in your browser. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000000..f3cec69bcea6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' + +services: + doc: + build: .docker + working_dir: /var/www + volumes: + - .:/var/www/en