Updated README to include instructions on docker

This commit is contained in:
Mike Farah 2021-08-15 21:22:39 +10:00
parent 9de0d0aae1
commit d2e89f7c72

View File

@ -114,6 +114,14 @@ rm /etc/myfile.tmp
docker run --rm -v "${PWD}":/workdir mikefarah/yq <command> [flags] [expression ]FILE...
```
#### Pipe in via STDIN:
You'll need to pass the `-i\--interactive` flag to docker:
```bash
cat myfile.yml | docker run -i --rm mikefarah/yq e . -
```
#### Run commands interactively:
```bash
@ -128,6 +136,7 @@ yq() {
}
```
#### Running as root:
`yq`'s docker image no longer runs under root (https://github.com/mikefarah/yq/pull/860). If you'd like to install more things in the docker image, or you're having permissions issues when attempting to read/write files you'll need to either: