add docker documentation

This commit is contained in:
Raffaele Mignone 2020-02-23 19:00:58 +01:00
parent 5af573f2d5
commit d6a00fd74e
Signed by: norangebit
GPG Key ID: F5255658CB220573
1 changed files with 49 additions and 0 deletions

View File

@ -6,10 +6,12 @@ A pandoc LaTeX template for creating a curriculum vitae.
- [Installation](#installation)
- [Usage](#usage)
- [Variables](#variables)
- [Docker](#docker)
- [Italiano](#italiano)
- [Installazione](#installazione)
- [Uso](#uso)
- [Variabili](#variabili)
- [Docker](#docker-1)
## English
@ -65,6 +67,29 @@ pandoc cv.yaml --template pancv -o cv.pdf
- `left` (*string*) left part of the section.
- `right` (*string*) right part of the section.
### Docker
This template can also be used through a [docker](https://www.docker.com/) container.
The first operation to do is to retrieve the [`norangebit/pandocker`](https://git.norangeb.it/norangebit/pandocker) image through the following command:
```bash
docker pull norangebit/pandocker
```
after which you can run the container with the command:
```bash
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` norangebit/pandocker <cmd>
```
where instead of `<cmd>` the desired pandoc command must be inserted.
For example, you can get the same result as the [previous example](#usage) through the command:
```
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` norangebit/pandocker pandoc cv.yaml --template pancv -o cv.pdf
```
## Italiano
**Pancv** è un template per [pandoc](https://pandoc.org/) per la realizzazione di *curriculum vitae*.
@ -118,3 +143,27 @@ pandoc cv.yaml --template pancv -o cv.pdf
- `items` (*list*) elementi della sezione.
- `left` (*string*) parte di sinistra della sezione.
- `right` (*string*) parte di destra della sezione.
### Docker
Questo template può essere utilizzato anche a traverso un container [docker](https://www.docker.com/).
La prima operazione da fare è recuperare l'immagine [`norangebit/pandocker`](https://git.norangeb.it/norangebit/pandocker) attraverso il seguente comando:
```bash
docker pull norangebit/pandocker
```
dopo di che è possibile eseguire il container con il comando:
```bash
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` norangebit/pandocker <cmd>
```
dove al posto di `<cmd>` va inserito il comando pandoc desiderato.
Per esempio si può ottenere lo stesso risultato dell'[esempio precedente](#uso) attraverso il comando:
```
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` norangebit/pandocker pandoc cv.yaml --template pancv -o cv.pdf
```