Pull the container image and decode your first QR code image
QR Code AI publishes the open-source QR Code Scanner container image on GitHub Container Registry (GHCR) and lists it on Artifact Hub as a verified publisher. The CLI image bundles qrscan for Linux AMD64 and ARM64, reading mounted files and outputting JSON completely offline. A companion GHCR image provides a self-hosted HTTP scanning endpoint for backend services that prefer HTTP requests.
Pull the image and test the public sample
The first step downloads a public QR sample into your current folder as clean-qr.png. The Docker commands then pull the multi-architecture GHCR CLI image and decode the mounted file offline.
curl -fsSL -o clean-qr.png \
https://raw.githubusercontent.com/qrcode-ai-com/qrcode-barcode-scanner-rust/main/fixtures/clean/OK_68ms_100_4e875a2c.png
image=ghcr.io/qrcode-ai-com/qrcode-barcode-scanner:0.12.2
docker pull "$image"
docker run --rm --network none --read-only --cap-drop ALL \
--mount type=bind,src="$PWD",dst=/input,readonly "$image" /input/clean-qr.png --prettyThis invocation mounts the working folder read-only, drops all Linux capabilities and disables networking. Adding --pretty prints a short terminal summary of the first detection. qrscan supports three profiles: full (the default) calculates a full-depth QR quality score, fast computes a lighter score and frame performs decode-only scanning.
These snippets are written for POSIX shells like bash and zsh.
The same container image decodes barcodes too: refer to the Barcode Scanner Docker guide.
Expected output
Because the container wraps the same qrscan executable, its output matches the local CLI. Against that sample image, --pretty displays the following summary:
content https://qrc-ai.com/76xMa
symbology QrCode
payload Url { url: "https://qrc-ai.com/76xMa" }
symbol v2 · 25x25 modules
engines rxing+rqrr
score 100/100 (Excellent)
resolution 5/5
blur 5/5
contrast 5/5
perspective 5/5
rotation 5/5
lighting 5/5
uec margin 1.00 (grade A · worst block 0/16 ec)
iso15415 overall A (informed, not certified)
contrast 1.00/A · modulation 1.00/A · axial 0.001/A · fixed-pattern 1.00/A
took 10msThe processing time on the final line depends on your host machine.
Write the JSON report to the host
To scan your own file, such as qr-reference.png, place it inside the mounted folder. Without --pretty, qrscan outputs the complete JSON scan report to stdout. Redirect stdout to a host file so the container writes nothing itself.
docker run --rm --network none --read-only --cap-drop ALL \
--mount type=bind,src="$PWD",dst=/input,readonly \
ghcr.io/qrcode-ai-com/qrcode-barcode-scanner:0.12.2 /input/qr-reference.png --profile fast > report.jsonWhen qr-reference.png encodes https://qrcode-ai.com/, that exact URL appears inside the JSON report.
Refer to the QR Code Scanner CLI guide for the full set of command flags.
Consult the distribution guide for current tags, SHA-256 digests and provenance verification.
