docker php container with wkhtmltopdf missing /lib64/ld-linux-x86-64.so.2

Viewed 370

Trying to run php:8.0.12-fpm with docker on new mac pro with m1. And cannot make run in php container wkhtmltopdf.

my php Dockerfile looks like:

FROM arm64v8/php:8.0-fpm

USER root

# change user and groups ids
RUN usermod --uid=1000 www-data && \
    groupmod --gid=1000 www-data && \
    # fix permissions
    chown -R www-data:www-data /var/www/


RUN apt update && apt install -y libxrender1 && apt install -y libfontconfig1 && apt install -y libfontconfig

RUN curl "https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz" -L -o "wkhtmltopdf.tar.xz" \
    && tar Jxvf wkhtmltopdf.tar.xz \
    && mv wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf


USER www-data

when trying to run wkhtmltopdf always getting qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

Also somewhere read that need to install like this:

RUN apt-get install -y libfontconfig wkhtmltopdf

But then lots of options are not supported (like --footer-font-size)

Also tried to build FROM php:8.0-fpm.. nothing changes..

0 Answers
Related