</code></pre></div> You can replace the last line with any yq command and argument, which will be passed to yq inside the image.</p><p><divclass=highlight><pre><span></span><code>docker run --rm \
</code></pre></div> You can replace the last line with any jq command and argument, which will be passed to jq inside the image.</p><p><divclass=highlight><pre><span></span><code>docker run --rm \
</code></pre></div> You can replace the last line with any xq command and argument, which will be passed to xq inside the image.</p><h3id=recommended-method>Recommended method</h3><p>We provide a very convenient script that allows the yq container to run as if it was installed natively: <divclass=highlight><pre><span></span><code>sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-yq.sh -o /usr/local/bin/yq
</code></pre></div> Running these two commands on your docker host once will let you issue commands such as <code>yq .foo.bar input.yml</code> and the yq container will do its job behind the scenes.</p><p><divclass=highlight><pre><span></span><code>sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-jq.sh -o /usr/local/bin/jq
</code></pre></div> Running these two commands on your docker host once will let you issue commands such as <code>jq .foo.bar input.json</code> and the jq container will do its job behind the scenes.</p><p><divclass=highlight><pre><span></span><code>sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-yq/master/run-xq.sh -o /usr/local/bin/xq
</code></pre></div> Running these two commands on your docker host once will let you issue commands such as <code>xq .foo.bar input.xml</code> and the xq container will do its job behind the scenes.</p><h2id=docker-mods>Docker Mods</h2><p><ahref="https://mods.linuxserver.io/?mod=yq"title="view available mods for this container."><imgalt="Docker Mods"src="https://img.shields.io/badge/dynamic/yaml?style=for-the-badge&color=E68523&label=mods&query=%24.mods%5B%27yq%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml"></a></p><p>We publish various <ahref=https://github.com/linuxserver/docker-mods>Docker Mods</a> 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.</p><h2id=support-info>Support Info</h2><ul><li>image version number</li><li><code>docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/yq</code></li></ul><h2id=updating-info>Updating Info</h2><h3id=via-docker-cli>Via Docker Cli</h3><ul><li>Update the image: <code>docker pull linuxserver/yq</code></li><li>You can also remove the old dangling images: <code>docker image prune</code></li></ul><h2id=building-locally>Building locally</h2><p>If you want to make local modifications to these images for development purposes or just to customize the logic: <divclass=highlight><pre><span></span><code>git clone https://github.com/linuxserver/docker-yq.git
</code></pre></div></p><p>The ARM variants can be built on x86_64 hardware using <code>multiarch/qemu-user-static</code><divclass=highlight><pre><span></span><code>docker run --rm --privileged multiarch/qemu-user-static:register --reset