¿Alguien ha podido instalar wkhtmltopdf en python:3.6.0-alpine.
He probado todas las soluciones presentes en Internet. Necesito usar pdfkit que internamente usa wkhtmltopython para convertir html a pdf.
Es posible que necesite wkhtmltopdf y xvfb para ejecutarse en un servidor:
apk add wkhtmltopdf xvfbEn caso de que a alguien le gustaría tener la línea completa que debe agregarse al Dockerfile:
RUN apk update && apk add wkhtmltopdfo:
RUN apt-get update && apt-get install -y wkhtmltopdfA continuación, puede utilizar el siguiente código en su secuencia de comandos de Python "Dockerized":
import pdfkit path_wkhtmltopdf = '/usr/bin/wkhtmltopdf' config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf) pdfkit.from_string(html, '<direction/of/the/report.pdf>', configuration=config)