summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorsheepster <omer531998@gmail.com>2024-05-01 07:07:10 +0300
committerGitHub <noreply@github.com>2024-05-01 06:07:10 +0200
commitd875ff5c7a7a77e6234c2c5aea44aaae3bea1143 (patch)
treeb7cc00b379905bb07d073f337c351e5ef88c5f7b /README.md
parent6ce6e7c71355a0b6006e9e3371364f6945da5a29 (diff)
doc(readme): Add docker usage doc (#3103)
* doc(readme): Add docker usage doc * fix heading size Co-authored-by: itchyny <itchyny@cybozu.co.jp>
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1d06b0cf..691adc49 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,17 @@ Download the latest releases from the [GitHub release page](https://github.com/j
Pull the [jq image](https://github.com/jqlang/jq/pkgs/container/jq) to start quickly with Docker.
+
+#### Run with Docker
+##### Example: Extracting the version from a `package.json` file
+```bash
+docker run --rm -i ghcr.io/jqlang/jq:latest < package.json '.version'
+```
+##### Example: Extracting the version from a `package.json` file with a mounted volume
+```bash
+docker run --rm -i -v "${PWD}":/pwd -w /pwd ghcr.io/jqlang/jq:latest '.version' package.json
+```
+
### Building from source
#### Dependencies