How to run docker newman command with newman-reporter-htmlextra using local collection, environment and testdata file

docker run -it -w /app -v "${HOST_DIR}:/app" "$HOST_DIR/collection:/tmp/collection" -v "$HOST_DIR/testData:/tmp/testdata" -v "$HOST_DIR/environment:/tmp/environment" -t postman/newman:alpine run "/tmp/collection/stella.collection.json" --reporters="cli,htmlextra" --reporter-html-export="report.html" -d "/tmp/testdata/stella.json" --environment="/tmp/environment/postman_stella_dev.json" --globals="/tmp/environment/postman_globals.json"

I got this error
docker: invalid reference format: repository name must be lowercase.

I don’t know a great deal about Docker so hopefully someone else can jump in with some information but --reporter-html-export=“report.html” should be --reporter-htmlextra-export=“report.html”.

thanks Dannydainton, I got it work now
I got another question which I open another thread

1 Like

docker run -v “(pwd)"/Report:/tmp/report -v "(pwd)”/TestData:/tmp/testdata -v “(pwd)"/Collection:/tmp/collection -v "(pwd)”/environment:/tmp/environment --entrypoint /bin/sh postman/newman:alpine -c "npm i -g newman-reporter-htmlextra; newman run /tmp/collection/stella.collection.json -e /tmp/environment/postman_stella_dev.json -g /tmp/environment/postman_globals.json -d /tmp/testdata/stella.json --reporters=“cli,htmlextra” --reporter-htmlextra-export /tmp/report/report.html