mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
* Use environment variable for format to build * Use Makefile instead of docker-compose.yml This allows us to build different formats more easily, and use phd and doc-base from parallel checkouts, which is much easier for issues that span the repositories.
20 lines
646 B
Docker
20 lines
646 B
Docker
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
|
|
|
|
ENV FORMAT=xhtml
|
|
|
|
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 ${FORMAT}
|