I need a Docker image which contains a Linux executable where I can pipe an input file into when running it like this (in cmd
on Windows or bash
on Linux):
docker run --rm -i myContainer < myInputFile > myOutputFile
In my case it is the executable cucumber-json-formatter-linux-386 which converts NDJSON Cucumber messages into a JSON file (to be used e.g. for Xray).
Why Docker?
- There is also a Windows executable available, but our security software says it contains a virus.
- So I can’t download it, but to be honest, I also don’t trust it.
- I need something OS indepedent, also running in CI, etc.
Why convert?
Cucumber can output JSON directly. But I am using @badeball/cypress-cucumber-preprocessor which only can output NDJSON and needs me to use that binary to convert it into JSON. @badeball wrote “I've refactored my implementation to output messages, because that was significantly easier implementation wise”. So it’s not Cucumber writing those NDJSON messages here.