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