Pull the Docker image and scan your first QR code image
QR Code AI publishes the QR Code Scanner container image on the GitHub Container Registry (GHCR) and lists it on Artifact Hub as a verified publisher. The CLI container packages qrscan for Linux AMD64 and ARM64, reading mounted files and returning a scan report completely offline. Where a pipeline prefers HTTP requests to one-shot CLI runs, a separate GHCR image provides a self-hosted HTTP scanning service.
Pull the image and decode the public sample
The first command downloads a public QR code sample into your current folder as clean-qr.png. The Docker commands then pull the multi-platform 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 command mounts your current directory read-only, drops all Linux capabilities and switches off network access. --pretty prints a readable terminal summary for the first detection. qrscan offers three scan profiles: full (the default) calculates the QR quality score at full depth, fast calculates it at reduced depth and frame decodes only.
These commands are written for a POSIX shell such as bash or zsh.
The same container image also decodes barcodes: see the Barcode Scanner Docker guide.
What the container returns
Because the container packages the same qrscan binary, its output matches the local CLI. For the downloaded sample QR image, --pretty prints the following terminal 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 elapsed time on the final line depends on your local machine.
Write the JSON report to the host
To scan your own file, such as qr-reference.png, place it in the host folder you mount. Without --pretty, qrscan outputs the complete scan report as JSON. Redirect standard output to a host file: the container itself writes nothing to disk.
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.jsonWhere qr-reference.png encodes https://qrcode-ai.com/, the JSON report contains that address.
See the QR Code Scanner CLI guide for the full list of options.
The distribution guide documents published release tags, image digests and provenance verification.
