Sign inSign up
postman logo

rechtlogisch/postman

By rechtlogisch

•Updated about 23 hours ago

Image
0

981

rechtlogisch/postman repository overview

⁠Node.js with Postman CLI

GitHub Workflow actions Size Tags

A custom image for CI pipelines to sign in to Postman and run a collection.

Based on the currently supported stable Node.js slim images (node⁠).

Features:

  • Node.js 22 / Node.js 24 / Node.js 26 / Node.js LTS (based on tags⁠)
  • Postman CLI⁠ (postman)
  • Standard setup requires just two environment variables
  • Customizable runtime usage with additional environment variables

This Dockerfile is built with a GitHub Workflow⁠. A dispatched run publishes linux/amd64 and linux/arm64 images for each Node.js tag to Docker Hub and GitHub Container Registry.

⁠Usage

Use ghcr.io/rechtlogisch/postman or rechtlogisch/postman. Tags follow the Node.js major versions, plus lts.

POSTMAN_COLLECTION is required. Set POSTMAN_API_KEY for a collection in the Postman cloud. A collection file on disk can run without a key. With the image defaults, the entrypoint logs in when a key is present and runs:

postman collection run "$POSTMAN_COLLECTION" --reporters cli,junit --reporter-junit-export /reports/report.xml

A local collection file skips login when POSTMAN_API_KEY is unset:

docker run --rm \
  -e POSTMAN_COLLECTION=/work/collection.json \
  -v "$PWD:/work" \
  ghcr.io/rechtlogisch/postman:lts

Mount a host directory on /reports to keep the JUnit file.

docker run --rm \
  -e POSTMAN_API_KEY \
  -e POSTMAN_COLLECTION=12345678-1234-1234-1234-123456789012 \
  -v "$PWD/reports:/reports" \
  ghcr.io/rechtlogisch/postman:lts

Words after the image name are appended to postman collection run. Use them for an environment, a data file, --bail, or any other CLI flag:

docker run --rm \
  -e POSTMAN_API_KEY \
  -e POSTMAN_COLLECTION \
  ghcr.io/rechtlogisch/postman:lts \
  -e staging \
  --bail

POSTMAN_FOLDERS is a comma-separated list. Each entry becomes one -i (folder name, path, or id).

docker run --rm \
  -e POSTMAN_API_KEY \
  -e POSTMAN_COLLECTION \
  -e POSTMAN_FOLDERS="Auth,Checkout" \
  ghcr.io/rechtlogisch/postman:lts

scripts/run-local clears the entrypoint and runs one command in the container:

scripts/run-local "postman --version"

Tip

You can provide an explicit `IMAGE_TAG` on runtime.

⁠Environment variables

VariableRequiredDefaultEffect
POSTMAN_COLLECTIONyesCollection id or path inside the container. The run exits when this is empty.
POSTMAN_API_KEYSigns in with postman login --with-api-key before the run. Leave unset for a local collection that needs no login.
POSTMAN_REGIONPassed as postman login --region. Applied only when POSTMAN_API_KEY is set.
POSTMAN_FOLDERSComma-separated folder names, paths, or ids. Each value is one -i. Surrounding spaces are ignored.
POSTMAN_REPORTERScli,junitComma-separated reporters: cli, json, junit, html.
POSTMAN_REPORT_DIR/reportsDirectory for the json, junit, and html files. An empty value skips the export flags and leaves the CLI default ./postman-cli-reports.
POSTMAN_REPORT_BASENAMEreportFile name without an extension. An empty value lets the CLI name the files inside POSTMAN_REPORT_DIR.
POSTMAN_REPORT_OMITComma-separated cuts for the json and html reporters: headers, requestBodies, responseBodies, all.
POSTMAN_JSON_STRUCTUREPassed as --reporter-json-structure when the json reporter is enabled, for example newman.
POSTMAN_DEBUGSet to 1 to print the collection run command on stderr. The API key is left out of that line.

Report extensions are .xml for junit, .json for json, and .html for html. The default JUnit path is /reports/report.xml. The entrypoint creates the export directory.

-r or --reporters after the image name replaces POSTMAN_REPORTERS. The image then skips the export flags from POSTMAN_REPORT_DIR and POSTMAN_REPORT_BASENAME. A --reporter-<name>-export argument does the same for that one reporter. --reporter-json-structure on the command line is kept as given.

POSTMAN_REPORT_OMIT=all maps to --reporter-<name>-omitAllHeadersAndBody (allHeadersAndBody is the same choice). Any other token stops the run with an error. Omit flags are added for json and html only.

⁠Reporters

  • CLI, printed to stdout
  • JUnit, written to /reports/report.xml unless POSTMAN_REPORT_DIR or POSTMAN_REPORT_BASENAME is changed
  • JSON and HTML, included when named in POSTMAN_REPORTERS

⁠Build

make builds ghcr.io/rechtlogisch/postman:lts. It pulls a fresh base image and passes TAG as the Node.js tag (node:${TAG}-slim).

make

TAG is typically {major-version}, or lts. IMAGE sets the repository name.

make TAG=24
make IMAGE=rechtlogisch/postman

⁠Contributing

Please see CONTRIBUTING⁠ for details.

⁠Security Vulnerabilities

Please review our security policy⁠ on how to report security vulnerabilities.

⁠Credits

⁠License

The MIT License (MIT). Please see License File⁠ for more information.

Tag summary

Content type

Image

Digest

sha256:37ffc4cff…

Size

294.8 MB

Last updated

about 23 hours ago

docker pull rechtlogisch/postman:22