Skip to content

Template container for wkhtmltopdf in HTTP server with PHP 7.3.

Notifications You must be signed in to change notification settings

redbitcz/docker-php-wkhtmltopdf-template

Repository files navigation

wkhtmltopdf + fonts + PHP as Docker

Template container for wkhtmltopdf in HTTP server with PHP.

Main features

  • included wkhtmltopdf
  • Apache (with mod_expires, mod_headers and mod_rewrite modules)
  • PHP (7.4, 8.0, 8.1)
  • fixed sub-pixel rendering bug (wkhtmltopdf/wkhtmltopdf#3585)
  • installed extended set of fonts (optimized cache incl.)
  • optimized for small image size a fast load
  • ready to run in serverless environment (Google Cloud Run, etc.)

Download image

Call command docker pull redbitcz/wkpdf (more info).

Template philosophy

This project does not provide finished solution, but only prepared container with configured features – feel free to write your own app inside now.

Use for your custom Image

In your Dockerfile put to FROM directive redbitcz/wkpdf.

Usage

In your project create Dockerfile file with content:

FROM redbitcz/wkpdf
COPY . /var/www/html

Build your own image with command:

docker build .

You can also debug it with docker-compose.yml:

version: '3.1'
services:
  web:
    image: redbitcz/wkpdf:debug
    ports:
      - "8080:8080"
    volumes:
      - ".:/var/www/html"
    restart: always
    environment:
      APP_DEBUG: 1
      XDEBUG_CONFIG: "client_host=host.docker.internal"
      PORT: 8080

and then run:

docker compose up

Thanks to

About

Template container for wkhtmltopdf in HTTP server with PHP 7.3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published