Open sdavids opened 2 months ago
https://fontconfig.pages.freedesktop.org/fontconfig/fontconfig-user.html#AEN73
$ docker run --user "$(id -u):$(id -g)" --rm -e XDG_CACHE_HOME=/tmp asciidoctor/docker-asciidoctor:1.76.0 sh -c 'fc-cache && ls /tmp/fontconfig'
12b26b760a24f8b4feb03ad48a333a72-le64.cache-9
3830d5c3ddfd5cd38a049b759396e72e-le64.cache-9
51d7d9064f616a814da14ac1dd7116cb-le64.cache-9
5ca8086aeacc9c68e81a71e7ef846b3b-le64.cache-9
6ba42ae0000f58711b5caaf10d690066-le64.cache-9
923e285e415b1073c8df160bee08820f-le64.cache-9
CACHEDIR.TAG
a1c95d6dfc9a7b34f44445cf81166004-le64.cache-9
b67b32625a2bb51b023d3814a918f351-le64.cache-9
c470550e31544075faff60bdbbb5d457-le64.cache-9
$ docker run \
--rm \
-u "$(id -u):$(id -g)" \
-v '/tmp/test:/documents' \
-e XDG_CACHE_HOME=/tmp \
asciidoctor/docker-asciidoctor:1.76.0 \
sh -c 'asciidoctor-pdf -r asciidoctor-diagram test.adoc'
You might want to add ENV XDG_CACHE_HOME=<some world writable location other than /tmp>
to your Dockerfile.
so that --user "$(id -u):$(id -g)"
can write to it.
This surfaces when you use asciidoctor-diagram with PlantUML: