Docker image for jq based on alpine linux image, just over 4MB in size.
This image also contains curl to make HTTP requests.
Test jq
command:
$ docker run --rm --name jq endeveit/docker-jq \
sh -c 'echo "{\"foo\":\"bar\"}" | jq .'
{
"foo": "bar"
}
Test a complex command:
$ docker run --rm --name jq endeveit/docker-jq \
sh -c 'echo "{\"foo\":\"bar\"}" | jq ". | .foo as \$var | \$var"'
"bar"
Start an interactive container with jq:
$ docker run -it --rm --name jq endeveit/docker-jq
This will drop into /bin/sh
, then jq
command can be run:
# jq