Docer Pdf Site
RUN pip3 install ocrmypdf weasyprint
version: '3.8' services: pdf-generator: image: ghcr.io/kozea/weasyprint:latest ports: - "8080:8080" command: weasyprint --server 0.0.0.0:8080 volumes: - ./templates:/templates Send HTML via POST: docer pdf
docker build -t my-pdf-toolkit . docker run --rm -v $(pwd):/work -it my-pdf-toolkit Example API that generates PDFs from HTML: RUN pip3 install ocrmypdf weasyprint version: '3
Build and run:
FROM ubuntu:22.04 RUN apt-get update && apt-get install -y pdftk poppler-utils ghostscript libreoffice-headless python3-pip && rm -rf /var/lib/apt/lists/* docer pdf