1M+
The LinuxServer.io team brings you another container release featuring:
Find us at:
yq: Command-line YAML/XML processor - jq wrapper for YAML and XML documents. This image includes yq, jq, and xq.
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 and our announcement here.
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-<version tag> |
| arm64 | ✅ | arm64v8-<version tag> |
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.
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.
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.
We provide a very convenient script that allows the yq container to run as if it was installed natively:
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.
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.
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.
We publish various 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.
docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/yqdocker pull linuxserver/yqdocker image pruneIf you want to make local modifications to these images for development purposes or just to customize the logic:
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
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.
$ in cases where they should not (ex: inside single quotes). Please rerun the Recommended method install/setup commands.Content type
Image
Digest
sha256:9932bc0d0…
Size
30.6 MB
Last updated
3 days ago
docker pull linuxserver/yq:4.1.2Pulls:
13,395
Last week