Forum How do I...?

Paid Prince not working in Docker

I'm having a great deal of difficulty getting our paid copy of Prince working in our existing Docker image. I see that Prince has sample Dockerfiles [1], but these all use Debian and we’re using Alpine [2].

The original error message [3] indicates the absence of shared libraries like libxml2. I see these listed in michaelperrin’s dockerfile [4], but when I try to add that “apk add” command to our existing Dockerfile, it throws some error or another no matter where in the file I place it.

If I put it in one location in the file, I get a nasty “relink” error [5] apparently involving glibc versus musl. If I place it in a different location, I get a “non-zero code: 99” [6], which the web says should be fixed by adding “USER root” to the dockerfile (obviously not ideal), but that doesn't help. And so on.

FWIW, we’re using node-prince [7], which just calls the Prince CLI normally. This works outside of Docker but not in Docker. I can share our Dockerfile with Prince support, but I’d rather not post it on the public web. Thank you!


FROM node:12.18.3-alpine3.12

e.stderr.toString(): /report-producer/node_modules/prince/prince/lib/prince/bin/prince: error while loading shared libraries: cannot open shared object file: No such file or directory


/report-producer/node_modules/prince/prince/lib/prince/bin/prince: Relink `/lib/' with `/usr/glibc-compat/lib/' for IFUNC symbol `memchr'

The command '/bin/sh -c apk add --no-cache libxml2 pixman tiff giflib libpng lcms2 libjpeg-turbo fontconfig freetype libgomp' returned a non-zero code: 99

Perhaps you could email me ( the Dockerfile?
Done and resolved per our email thread. Thank you!