When I run:
docker run --rm -v $(pwd):/app instrumentisto/phpdoc \
-f modele/AccesBDD/GestionBDD.php -t ./sortie
Result:
Collecting files .. OK
Initializing parser .. OK
Parsing files
Parsing /app/modele/AccesBDD/GestionBDD.php
Storing cache in "/app/sortie" .. OK
Load cache .. 0.017s
Preparing template "clean" .. 0.008s
Preparing 17 transformations .. 0.000s
Build "elements" index .. 0.000s
Replace textual FQCNs with object aliases .. 0.001s
Resolve @link and @see tags in descriptions .. 0.000s
Enriches inline example tags with their sources .. 0.000s
Build "packages" index .. 0.000s
Build "namespaces" index and add namespaces to "elements" .. 0.000s
Collect all markers embedded in tags .. 0.000s
Transform analyzed project into artifacts ..
Applying 17 transformations
Initialize writer "phpDocumentor\Plugin\Core\Transformer\Writer\FileIo"
Initialize writer "phpDocumentor\Plugin\Twig\Writer\Twig"
Initialize writer "phpDocumentor\Plugin\Graphs\Writer\Graph"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Warning: file_put_contents(/app/sortie//): failed to open stream: Is a directory in phar:///usr/local/bin/phpdoc/src/phpDocumentor/Plugin/Twig/Writer/Twig.php on line 117
Execute transformation using writer "twig"
Warning: file_put_contents(/app/sortie//): failed to open stream: Is a directory in phar:///usr/local/bin/phpdoc/src/phpDocumentor/Plugin/Twig/Writer/Twig.php on line 117
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Warning: file_put_contents(/app/sortie//): failed to open stream: Is a directory in phar:///usr/local/bin/phpdoc/src/phpDocumentor/Plugin/Twig/Writer/Twig.php on line 117
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Execute transformation using writer "twig"
Execute transformation using writer "Graph"
0.448s
Analyze results and write report to log .. 0.000s
Directory sortie/files is empty.
Link not work in the page.

I don't know if I miss something into the config or if it's a bug.
It looks like it has to do something with the dubble / in your target path. But I don't know where this is comming from. Please check your config for that.
I looked at the code and I think the problem comes from building the path.
I think in the alpine version of php/docker it lacks a package which php uses to interact with the file system.
If you can point me that line I can have a look too :-)
I think in the Pathfinder class but i'm not sure. I did not have the time to test this intuition
line 103 in src/phpDocumentor/Plugin/Twig/Writer/Twig.php
I was debugging to make it work in alpine (latest php:fpm-alpine).
in phpdocumentor/src/phpDocumentor/Transformer/Router/Rule.php line 102 i found:
if (extension_loaded('iconv')) {
subparts[0] = iconv('UTF-8', 'ASCII//TRANSLIT', $subparts[0]);
}
If i comment //subparts[0] = iconv('UTF-8', 'ASCII//TRANSLIT', $subparts[0]);` everything works fine.
In this line, iconv returns empty.
There is some problem with iconv in alpine:
https://github.com/docker-library/php/issues/428
https://github.com/docker-library/php/issues/240
https://hub.docker.com/r/orukami/alpine-php/
I'll try upadting iconv or something, for now.
@JulienPivard, this i solved ths problem (comment from https://github.com/docker-library/php/issues/240)
@alexanderilyin commented on May 30
A little bit cleaner hack:RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
Thanks :)
It's work, but :
The dockerfile
锘匡豢FROM php:7.2-rc-alpine
MAINTAINER PIVARD Julien <[email protected]>
# Install phpDocumentor executable
ADD https://github.com/phpDocumentor/phpDocumentor2/releases/download/v2.9.0/phpDocumentor.phar \
/usr/local/bin/phpdoc
RUN chmod 755 /usr/local/bin/phpdoc \
&& apk add --update --no-cache \
graphviz \
icu-libs libxslt \
&& apk add --no-cache --virtual .build-deps \
icu-dev libxslt-dev \
&& docker-php-ext-install intl xsl \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/*
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
VOLUME ["/app"]
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/phpdoc"]
The warnings :
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///usr/local/bin/phpdoc/src/phpDocumentor/Plugin/Core/Descriptor/Validator/Constraints/Functions/IsArgumentInDocBlockValidator.php on line 33
And write warnings in the doc :

Ok this is embarrassing. After more tests it seems that the latest (alpine 3.4) works perfectly with that dockerfile... My bad.
But 7.2-rc-alpine (alpine 3.6) Continues to generate warnings.
Ok after more investigations I find why not work the first time.
The dockerfile
FROM php:alpine
MAINTAINER PIVARD Julien <[email protected]>
# Install phpDocumentor executable
ADD https://github.com/phpDocumentor/phpDocumentor2/releases/download/v2.9.0/phpDocumentor.phar \
/usr/local/bin/phpdoc
RUN chmod 755 /usr/local/bin/phpdoc \
&& apk add --update --no-cache \
graphviz \
icu-libs libxslt \
&& apk add --no-cache --virtual .build-deps \
icu-dev libxslt-dev \
&& docker-php-ext-install intl xsl \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/*
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
VOLUME ["/app"]
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/phpdoc"]
With NO file phpdoc.dist.xml in src.
The call when it's work :
docker run --rm \
-v /Users/asmodee/Programmation/Association/SiteAsso/src:/app:ro \
-v /Users/asmodee/Programmation/Association/SiteAsso/Docker/Documentation:/out \
phpdoctest -d /app/modele -t /out
With file phpdoc.dist.xml in src.
The call when isn't work :
docker run --rm \
-v /Users/asmodee/Programmation/Association/SiteAsso/src:/app:ro \
-v /Users/asmodee/Programmation/Association/SiteAsso/Docker/Documentation:/out \
phpdoctest -c /app/phpdoc.dist.xml
No warnings or error are generated.
phpdoc.dist.xml
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>Site Association</title>
<parser>
<target>/out/cache</target>
<encoding>utf8</encoding>
<markers>
<item>TODO</item>
<item>FIXME</item>
</markers>
</parser>
<transformer>
<target>/out</target>
</transformer>
<files>
<directory>modele</directory>
</files>
<transformations>
<template name="clean" />
</transformations>
</phpdoc>
result when it's work :

result when isn't work :

In this config I see a number of suspects that could cause any warnings.
First the UTF-8. Is your source code written in UTF-8? This can be related to the iconv issues you had earlier.
With the execution without config you are not passing any todo markers. In the config you do.
Hope this helps a bit. If you have a working configuration I would like to have a dockerfile from you. We wanted to create one for the project. But only got a debian based image.
Please let me know if you have any questions or need help to solve this problem.
Thanks i found the probleme. All my source code is write in UTF-8. But if I remove target \
I don't think so; it seems your iconv is still acting up. That is why we don't have an Alpine box but a debian box
Normally this is gnu-libiconv and not iconv used by php in my config. But not solved the probleme :)
My Dockerfile
# vim: set nospell:
FROM php:alpine
MAINTAINER PIVARD Julien <[email protected]>
# Based on https://hub.docker.com/r/instrumentisto/phpdoc/
# Install phpDocumentor executable
ADD https://github.com/phpDocumentor/phpDocumentor2/releases/download/v2.9.0/phpDocumentor.phar \
/usr/local/bin/phpdoc
RUN chmod 755 /usr/local/bin/phpdoc \
&& apk add --update --no-cache \
graphviz \
icu-libs libxslt \
&& apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing \
gnu-libiconv \
&& apk add --no-cache --virtual .build-deps \
icu-dev libxslt-dev \
&& docker-php-ext-install intl xsl \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/*
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
VOLUME ["/app"]
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/phpdoc"]
Is there any workaround? I can not and do not want to switch back to debian, after all that work I've put to get php:fpm-alpine running :-(
We didn't put any effort into this issue because there are more important things to do for us.
Feel free to create a pr when you found a solution. We will be happy to support it with future development.
@port22 No, sorry, I didn't find anything and I don't have time to work on it. But if you find a solution I'm always interested
My new add:RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
It still doesn't work
Found a solution in this https://github.com/docker-library/php/issues/240, it works for me!
apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted
export LD_PRELOAD=/usr/lib/preloadable_libiconv.so php
I'll try it on when I have time.