openlabs / docker-wkhtmltopdf

Dockerfile for wkhtmltopdf
58 stars 35 forks source link

Update url of wkhtmltopdf .deb package #9

Open davidbarre opened 8 years ago

davidbarre commented 8 years ago

(project change from sourceforce to gna.org)

Related to this issue https://github.com/openlabs/docker-wkhtmltopdf/issues/5

msva commented 7 years ago

gna org looks dead as well :-/

GabLeRoux commented 6 years ago

Releases are now in github. URL looks something like this:

https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

Here's what I used on a debian based docker image:

ARG WKHTMLTOPDF_VERSION=0.12.2.1

RUN apt-get update -y \
  && apt-get install -y build-essential xorg libssl-dev libxrender-dev wget gdebi
RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-jessie-amd64.deb \
  && gdebi --n wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-jessie-amd64.deb \
  && rm -rf /var/lib/apt/lists/*

I looked at latest version (0.12.4) and there seem to be a .tar.xz so something like this would probably work (untested):

ARG WKHTMLTOPDF_VERSION=0.12.4

RUN https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-generic-amd64.tar.xz \
  && tar xf wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-generic-amd64.tar.xz \
  && ln -s $(pwd)/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf \
  && ln -s $(pwd)/wkhtmltox/bin/wkhtmltoimage /usr/local/bin/wkhtmltoimage

:v: