@mermaid-js/mermaid-cli 10.2.4 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/index.html +1138 -575
- package/dist-types/src/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/index.js +3 -1
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ mmdc -h
|
|
|
123
123
|
|
|
124
124
|
# Alternative installations
|
|
125
125
|
|
|
126
|
-
## Use Docker:
|
|
126
|
+
## Use Docker/Podman:
|
|
127
127
|
|
|
128
128
|
```sh
|
|
129
129
|
docker pull minlag/mermaid-cli
|
|
@@ -149,6 +149,17 @@ the container to generate an SVG file as follows:
|
|
|
149
149
|
docker run --rm -u `id -u`:`id -g` -v /path/to/diagrams:/data minlag/mermaid-cli -i diagram.mmd
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
+
Or, if using [Podman](https://podman.io/), instead do:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
podman run --userns keep-id --user ${UID} --rm -v /path/to/diagrams:/data:z ghcr.io/mermaid-js/mermaid-cli/mermaid-cli -i diagram.mmd
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The key differences in the podman command versus the docker command are:
|
|
159
|
+
|
|
160
|
+
- The addition of the `--userns keep-id` argument. This allows the container to keep the same UID as the current user's UID in the container namespace instead of mapping to a subuid. Docs can be found [here](https://docs.podman.io/en/latest/markdown/options/userns.container.html)
|
|
161
|
+
- The addition of `:z` to the end of the volume mapping. This instructs podman to relabel the files in the volume with the SELinux label `container_file_t`, which allows processes in the container to access the files. See the "Labeling Volume Mounts" section [here](https://docs.podman.io/en/latest/markdown/podman-run.1.html#volume-v-source-volume-host-dir-container-dir-options) for more info.
|
|
162
|
+
|
|
152
163
|
In previous version, the input files were mounted in `/home/mermaidcli`. You can
|
|
153
164
|
restore this behaviour with the `--workdir` option:
|
|
154
165
|
|