ReLaXed creates PDF documents interactively using HTML or Pug (a shorthand for HTML). It allows complex layouts to be defined with CSS and JavaScript, while writing the content in a friendly, minimal syntax close to Markdown or LaTeX.
We must connect relaxed container with a container with chromium browser via the ssh protocol. The easiest solution is to use docker compose.
So create a file docker-compose.yml
with content:
version: '3.4'
services:
relaxed:
image: minidocks/relaxed
volumes:
- .:/app
- /tmp:/tmp
links:
- chromium
environment:
PUPPETEER_EXECUTABLE_PATH: /bin/chromium
PUPPETEER_ARG_REMOTE_DEBUGGING_ADDRESS: chromium
PUPPETEER_ARG_REMOTE_DEBUGGING_PORT: 0
ALIAS_CHROMIUM: ssh chromium chromium
working_dir: /app
chromium:
image: minidocks/chromium
volumes:
- .:/app
- /tmp:/tmp
cap_add:
- SYS_ADMIN
working_dir: /app
command: sshd
And in the same directory run command:
printf "h1 My document's title\np A paragraph in my document" > document.pug \
&& docker-compose run --rm relaxed document.pug --bo
Tag | Size |
---|---|
latest |