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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

401be4f · Jan 1, 2023

History

21 Commits
Jun 23, 2019
Jun 23, 2019
Nov 21, 2022
Nov 21, 2022
Dec 8, 2022
Nov 21, 2022
Nov 21, 2022
Nov 21, 2022
Nov 21, 2022
Jan 1, 2023
Dec 8, 2022
Nov 21, 2022
Dec 8, 2022
Nov 21, 2022
Aug 4, 2022
Aug 4, 2022
Nov 21, 2022

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