echo-json is a cli program to create a JSON object from simple shell arguments
10K+
echo-json is a tiny go cli utility that accepts name/value pairs as command line arguments and prints them as a JSON object.
$ echo-json foo bar baz '"quux"'
{"baz":"\"quux\"","foo":"bar"}
While this seems silly, it can be very helpful to output JSON formatted log messages in cli tools.
Docs and source: https://github.com/filex/echo-json/
This image is not really useful for direct execution. However, you can use it to see how echo-json works:
$ docker run --rm -it filex/echo-json foo bar baz:int 123
{"baz:int":"123","foo":"bar"}
The actual purpose of this image is being available as a COPY --from target if you want to use echo-json in your Docker image:
FROM filex/echo-json as echo-json
FROM alpine # … your image starts here
…
COPY --from=echo-json /echo-json /usr/local/bin/
Content type
Image
Digest
Size
680.6 kB
Last updated
over 6 years ago
docker pull filex/echo-json