h4cc / wkhtmltopdf-amd64

wkhtmltopdf - Convert html to pdf using webkit (qtwebkit). Linux amd64 Binary.
http://wkhtmltopdf.org/
GNU Lesser General Public License v3.0
471 stars 169 forks source link

Alpine Linux #21

Closed cdaguerre closed 6 years ago

cdaguerre commented 8 years ago

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?

Dist. Dependencies
Debian apt-get install xfonts-base xfonts-75dpi
Alpine apk add ttf-freefont fontconfig
Lednerb commented 8 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.

nanofelis commented 7 years ago

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.

dresselm commented 7 years ago

@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

imansilla commented 4 years ago

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

RafaelFernando12 commented 9 months ago

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/