https://github.com/linuxserver/docker-yq
https://github.com/linuxserver/docker-yq
hacktoberfest
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/linuxserver/docker-yq
- Owner: linuxserver
- License: gpl-3.0
- Created: 2020-10-08T02:12:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-04-29T22:10:11.000Z (about 1 month ago)
- Last Synced: 2026-04-30T00:14:16.760Z (about 1 month ago)
- Topics: hacktoberfest
- Language: Shell
- Size: 231 KB
- Stars: 9
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://linuxserver.io)
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
[](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
[](https://discourse.linuxserver.io "post on our community forum.")
[](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
[](https://github.com/linuxserver "view the source for all of our repositories.")
[](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
Find us at:
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
# [linuxserver/yq](https://github.com/linuxserver/docker-yq)
[](https://scarf.sh)
[](https://github.com/linuxserver/docker-yq)
[](https://github.com/linuxserver/docker-yq/releases)
[](https://github.com/linuxserver/docker-yq/packages)
[](https://gitlab.com/linuxserver.io/docker-yq/container_registry)
[](https://quay.io/repository/linuxserver.io/yq)
[](https://hub.docker.com/r/linuxserver/yq)
[](https://hub.docker.com/r/linuxserver/yq)
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-yq/job/master/)
[yq](https://github.com/kislyuk/yq): Command-line YAML/XML processor - jq wrapper for YAML and XML documents. This image includes `yq`, `jq`, and `xq`.
## Supported Architectures
Our images support multiple architectures such as `x86-64` and `arm64`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `linuxserver/yq` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\ |
| arm64 | ✅ | arm64v8-\ |
## Usage
### Docker cli
```text
docker run --rm \
-v "$PWD:$PWD" \
-w="$PWD" \
--entrypoint yq \
linuxserver/yq \
.foo.bar input.yml
```
You can replace the last line with any yq command and argument, which will be passed to yq inside the image.
```text
docker run --rm \
-v "$PWD:$PWD" \
-w="$PWD" \
--entrypoint jq \
linuxserver/yq \
.foo.bar input.json
```
You can replace the last line with any jq command and argument, which will be passed to jq inside the image.
```text
docker run --rm \
-v "$PWD:$PWD" \
-w="$PWD" \
--entrypoint xq \
linuxserver/yq \
.foo.bar input.xml
```
You can replace the last line with any xq command and argument, which will be passed to xq inside the image.
### Recommended method
We provide a very convenient script that allows the yq container to run as if it was installed natively:
```bash
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-yq.sh -o /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
```
Running these two commands on your docker host once will let you issue commands such as `yq .foo.bar input.yml` and the yq container will do its job behind the scenes.
```bash
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-jq.sh -o /usr/local/bin/jq
sudo chmod +x /usr/local/bin/jq
```
Running these two commands on your docker host once will let you issue commands such as `jq .foo.bar input.json` and the jq container will do its job behind the scenes.
```bash
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-xq.sh -o /usr/local/bin/xq
sudo chmod +x /usr/local/bin/xq
```
Running these two commands on your docker host once will let you issue commands such as `xq .foo.bar input.xml` and the xq container will do its job behind the scenes.
## Docker Mods
[](https://mods.linuxserver.io/?mod=yq "view available mods for this container.")
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) can be accessed via the dynamic badge above.
## Support Info
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/yq`
## Updating Info
### Via Docker Cli
* Update the image: `docker pull linuxserver/yq`
* You can also remove the old dangling images: `docker image prune`
## Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:
```text
git clone https://github.com/linuxserver/docker-yq.git
cd docker-yq
docker build \
--no-cache \
--pull \
-t linuxserver/yq:latest .
```
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
```bash
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Versions
* **09.07.25:** - Rebase to Alpine 3.22.
* **29.05.24:** - Rebase to Alpine 3.20.
* **08.01.24:** - Rebase to Alpine 3.19.
* **19.09.22:** - Rebase to Alpine 3.18, deprecate armhf.
* **19.09.22:** - Rebase to 3.17.
* **19.09.22:** - Rebase to 3.15.
* **18.05.21:** - Rebase to 3.13. add linuxserver wheel repo.
* **09.10.20:** - Fix run scripts evaluating `$` in cases where they should not (ex: inside single quotes). Please rerun the [Recommended method](https://github.com/linuxserver/docker-yq#recommended-method) install/setup commands.
* **07.10.20:** - Initial Release.