You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,32 @@ Use [composer](https://getcomposer.org/), so please run
21
21
composer require phpcfdi/cfditopdf
22
22
```
23
23
24
+
## Run with Docker
25
+
26
+
Running as a Docker container lets you use this CLI anywhere where Docker is installed without worrying about about any dependencies, not even PHP itself.
27
+
28
+
```shell
29
+
# This will mount the current working directory
30
+
# into a the /data directory inside the container
31
+
docker run --rm \
32
+
--volume $PWD:/data \
33
+
--user $(id -u):$(id -g) \
34
+
ghcr.io/phpcfdi/cfditopdf:latest \
35
+
/data/my-cfdi.xml \
36
+
/data/my-cfdi-output.pdf
37
+
```
38
+
39
+
You can optionally set an alias in your shell to simplify running the container (to make this alias permanent add the alias to your .bashrc fille).
40
+
41
+
```shell
42
+
alias cfditopdf='docker run --rm --volume $PWD:/data --user $(id -u):$(id -g) ghcr.io/phpcfdi/cfditopdf:latest'
43
+
44
+
# Then, execute just as `cfditopdf` (see usage in the next section)
0 commit comments