This is a daily-built (via cron job) of the latest and greatest BusyBox with JQ.
The 'jq' binary is set as the entrypoint for the image, so it can be run by piping JSON content to Docker Run:
cat file.json | docker run -it --rm wesleydeanflexion/busybox-jq '.'
Alternatively, I've included a script, 'busybox-jq' that does the above (plus the requesite 'tty' magic), so this will accomplish the same thing:
cat file.json | ./busybox-jq '.'
The build will:
- download the latest from the 'master' branch of 'stedolan/jq' from GitHub
- compile, link, and strip a static 'jq' executable
- build a Docker image based on BusyBox with 'jq' installed as the entrypoint
Because the base image is BusyBox and the executable is stripped, the resulting image is pretty small -- roughly 6.24mb at the time I wrote this.
The included .travis.yml file may be used to perform the build using Travis-CI and push the resulting image up to Docker Hub. That said, I've daily builds setup so you're welcome to use mine:
[https://hub.docker.com/r/wesleydeanflexion/busybox-jq]
This is a convenient (to me) way to use 'jq' on systems where jq is not installed but Docker is (and we can pull / run Docker images).
My role in this is just to build and slap in 'jq'; the fine authors of BusyBox and JQ did the real heavy lifting.
Me, I'm a DevSecOps Engineer with Flexion: