Closed cdaguerre closed 6 years ago
I've just tested to build a docker image based on alpine linux that should integrate all necessary dependencies for wkhtmltopdf.
The compiled binaries as supported in this repo don't work on alpine out of the box.
Finally, I tried to compile them but there's a problem:
Building is supported only on 64-bit Debian Jessie (i.e. stable release), and the binaries are produced in a self-contained chroot environment for the target distribution -- you will need to first setup the build environment and then only you can perform the build for a 32-bit or 64-bit binary. The following targets are currently supported:
From: https://github.com/wkhtmltopdf/wkhtmltopdf/blob/master/INSTALL.md#linux
I'm not very familiar with compiling binaries and that stuff but as I understand it's not possible at the moment to get wkhtmltopdf working under alpine linux.
Any news on this ? I am currently trying to run the binary from a php:7.1.3-fpm-alpine docker image but despite fixing all missing dependencies (listed by the ldd command) I had no success.
@nanofelis Just a heads up that we are using wkhtmltoimage
in our project atop alpine.
I was not aware of this thread, but I was having some issues as well and found these settings and they work like a charm: https://github.com/LoicMahieu/alpine-wkhtmltopdf/blob/master/Dockerfile
Any news on this ? I am currently trying to run the binary from a php:7.1.3-fpm-alpine docker image but despite fixing all missing dependencies (listed by the ldd command) I had no success.
you achieved install wkhtmltopdf inside php:7.1.3-fpm-alpine ? i need to know whats library dependencies for alpine you are used. Thanks
today in 2023 I need install wkhtmltopdf in docker with image based in linux, this is my dockerfile:
FROM madnight/docker-alpine-wkhtmltopdf as wkhtmltopdf_image FROM amd64/alpine:latest as image
RUN apk --no-cache add \ curl \ freetype \ freetype-dev \ ttf-freefont
COPY --from=wkhtmltopdf_image /bin/wkhtmltopdf /usr/bin/
Has anyone used this on Alpine linux? Does this really work out of the box? Don't we still need to install the runtime dependencies ? If so, can someone confirm the following dependencies?
apt-get install xfonts-base xfonts-75dpi
apk add ttf-freefont fontconfig