Inspired by docker-wkhtmltopdf-aas
wkhtmltopdf in a docker container as a web service.
This image is based on the ubuntu:20.04.
Run the container with docker run and binding the ports to the host. The web service is exposed on port 80 in the container.
docker run -d -p 80:80 docker-wkhtmltoimage-webservice
The container now runs as a daemon.
There are multiple ways to generate a PDF of HTML using the service.
This is a convenient way to use the service from command line utilities like curl.
curl -X GET -vv http://<docker-host>:<port>/?source=www.example.com
where:
- docker-host is the hostname or address of the docker host running the container