-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add Docker based PDF build environment
Addresses #1043
- Loading branch information
George Song
committed
Mar 11, 2021
1 parent
b705694
commit 8e0070d
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.8' | ||
|
||
services: | ||
pdf-builder: | ||
build: | ||
context: ../ | ||
dockerfile: docker/images/Dockerfile.pdf-builder | ||
image: edb/x-docs-pdf-builder | ||
container_name: pdf-builder | ||
hostname: pdf-builder | ||
working_dir: /app | ||
volumes: | ||
- ../:/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ubuntu:focal | ||
|
||
ARG PANDOC_VERSION=2.12 | ||
ARG PANDOC_DEB=pandoc-2.12-1-amd64.deb | ||
ARG WKHTML_TO_PDF_VERSION=0.12.6-1 | ||
ARG WKHTML_TO_PDF_DEB=wkhtmltox_${WKHTML_TO_PDF_VERSION}.focal_amd64.deb | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
python3 \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Pandoc | ||
RUN wget --no-check-certificate -P /tmp https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_DEB} \ | ||
&& apt-get install --no-install-recommends -y /tmp/${PANDOC_DEB} \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/* | ||
|
||
# Install wkhtmltopdf | ||
RUN wget --no-check-certificate -P /tmp https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTML_TO_PDF_VERSION}/${WKHTML_TO_PDF_DEB} \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends -y /tmp/${WKHTML_TO_PDF_DEB} \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/* |