phpDocumentor Docker image
phpDocumentor version v2.8.2
- Build with Docker
- Build with Docker Compose
cd <install-directory> wget https://raw.githubusercontent.com/spujadas/phpdoc-docker/master/phpdoc chmod +x phpdoc
Note – When using options that refer to directories (
-t), make sure that the paths you use are:
- relative to the current directory, e.g.
- at the same level as or below the current directory, e.g.
Tip – Solutions to avoid typing the
<install-directory>/ prefix include:
Using an alias, e.g.
alias phpdoc-docker="<install-directory>/phpdoc"(and you may want to consider including that command in your
phpdocscript to a directory in your
sudo cp <install-directory>/phpdoc /usr/local/bin/phpdoc-docker
When a new sebp/phpdoc image is available, update phpDocumentor with the following command:
sudo docker pull sebp/phpdoc-docker
First clone or download the spujadas/phpdoc-docker GitHub repository, open a shell in the newly created
phpdoc-docker directory, then build the image and run a container using Docker or Docker Compose, as explained below.
Build with Docker
This command will build the image:
$ sudo docker build . ... Successfully built 58b1388d0153
To run a container using this image, use the command in the
phpdoc script, replacing:
sebp/phpdocwith the image's identifier as returned by the
docker buildcommand (
58b1388d0153in the example above)
"$@"with the arguments you want to pass to
Build with Docker Compose
Build the image with this command:
$ sudo docker-compose build
Note – If you're not building the image in the default
phpdoc-docker directory, then append
-p phpdocdocker to this command so that the image is named correctly for the next command to work.
Run a container using this command:
$ ./docker.local-build <arguments>