1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

doc(readme): Add docker usage doc (#3103)

* doc(readme): Add docker usage doc

* fix heading size

Co-authored-by: itchyny <itchyny@cybozu.co.jp>
This commit is contained in:
sheepster
2024-05-01 07:07:10 +03:00
committed by GitHub
parent 6ce6e7c713
commit d875ff5c7a

View File

@ -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