Sign inSign up

twang2218/wkhtmltopdf

By twang2218

Updated about 10 years ago

Image
1

1.6K

twang2218/wkhtmltopdf repository overview

wkhtmltopdf docker image based on Alpine Linux

Dockerfile

FROM alpine:3.4
MAINTAINER Tao Wang <[email protected]>

ENV WKHTMLTOPDF_VERSION=0.12.3

RUN set -xe \
    && apk add --no-cache \
        xvfb \
    # Additionnal dependencies for better rendering
        ttf-freefont \
        fontconfig \
        dbus \
    # Install wkhtmltopdf from `testing` repository
    && apk add qt5-qtbase \
            wkhtmltopdf \
            --no-cache \
            --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
            --allow-untrusted \
    # Wrapper for xvfb
    && mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin
COPY ./wkhtmltopdf /usr/bin/wkhtmltopdf

ENTRYPOINT [ "wkhtmltopdf" ]

Run

$ docker run -it -v $(pwd)/pdf:/pdf twang2218/wkhtmltopdf https//www.google.com /pdf/google.com.pdf
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib/xorg/modules/dri)
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib/xorg/modules/dri)
Loading page (1/2)
Printing pages (2/2)
Done

Tag summary

Content type

Image

Digest

Size

62.7 MB

Last updated

about 10 years ago

docker pull twang2218/wkhtmltopdf