wkhtmltopdf / packaging

Packaging of wkhtmltopdf releases
https://wkhtmltopdf.org/downloads.html#stable
301 stars 136 forks source link

Docker build does not support selinux labels #148

Open mgraff opened 1 year ago

mgraff commented 1 year ago

If selinux labels are present on the host filesystem, the ./build package-docker command fails with this error:

/bin/sh: 0: Can't open /src/qt/configure

It's a permission denied error because of the selinux labels.

Solution: the :Z modifier has to be added on bind mounts in the build script.

For example, replace:

docker run --rm -v%s:/src -v%s:/tgt -v%s:/pkg

by

docker run --rm -v%s:/src:Z -v%s:/tgt:Z -v%s:/pkg:Z
ashkulz commented 1 year ago

@mgraff, thanks for reporting this! I found this documentation about it but I'm not sure what happens if you've not configured selinux?