QR Code Scanner with Docker

Decode QR code images inside a versioned container and pass structured output into your jobs and CI pipelines.

  • GHCR

    CLI container image

    View pull command

QR Code Scanner Docker at a glance

  • Published on GHCR and Artifact Hub

    CLI + HTTP

  • Linux architectures

    AMD64 + ARM64

  • Runs without network access

    Offline

  • Open-source licence

    MIT

Pull the container image and decode your first QR code image

QR Code AI publishes the QR Code Scanner container image on GitHub Container Registry (GHCR) and lists it on Artifact Hub as a verified publisher. The CLI container packages qrscan for Linux AMD64 and ARM64: it decodes mounted files and prints a report completely offline. A separate GHCR image ships a self-hosted HTTP scanning service for workloads that call HTTP endpoints instead of one-shot CLI runs.

Pull the container image and test the public sample

The first command saves 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.

Shell
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 --pretty

This command mounts the current directory read-only, drops all Linux capabilities and disables networking. --pretty outputs a concise terminal summary of the first detection. qrscan offers three profiles: full (default) scores QR quality at full depth, fast uses lighter scoring and frame decodes only.

Commands in this guide target a POSIX shell such as bash or zsh.

The same container image also decodes barcodes: check the Barcode Scanner Docker guide.

Expected output

Because the container wraps the exact same qrscan binary, its output matches the CLI. For that clean QR sample image, --pretty prints this terminal summary:

Text
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      10ms

The timing on the final line varies by host hardware.

Save the JSON report on the host

To decode your own image, such as qr-reference.png, place it inside the mounted folder. Without --pretty, qrscan writes the complete scan report as JSON to stdout. Redirect that stream to a host file because the container itself writes nothing.

Shell
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.json

If qr-reference.png encodes https://qrcode-ai.com/, that exact web address appears in the report.

See the QR Code Scanner CLI guide for every supported option.

The distribution and install guide documents published tags, image digests and provenance verification.

Published container images and catalogues

Pull the MIT-licensed CLI or HTTP service container from GHCR, or verify release metadata on Artifact Hub.

GitHub Container Registry (CLI)

Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner without an account for Linux AMD64 and ARM64. Pin a version tag or digest in CI pipelines and ensure user 65532 can read mounted files.

Artifact Hub

Inspect the verified-publisher catalogue entry on Artifact Hub to check available container tags, repository metadata and security summaries before pulling from GHCR.

HTTP Service Container (GHCR)

Run ghcr.io/qrcode-ai-com/qrcode-barcode-scanner-http when a self-hosted service prefers HTTP scan calls over mounting files for a one-shot CLI container.

How to run the QR Code Scanner container

Pull the GHCR image, mount your image directory read-only and capture both the JSON report and exit code.

  1. Step 1

    Pull the container image

    Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner using an explicit release tag or SHA-256 index digest across Linux AMD64 and ARM64.

  2. Step 2

    Mount your QR image folder

    Bind-mount the host directory read-only and pass its container path (such as /input/qr-reference.png), readable by non-root user 65532.

  3. Step 3

    Capture output and clean up

    Redirect stdout JSON to a host file, pass --rm to clean up and separate qrscan exit codes (0, 1, 2) from Docker startup errors (125 to 127).

What a decoded QR code returns

The container outputs the exact same JSON report as qrscan, carrying content.text and payload.kind for each detection without opening links.

A saved QR code image passes through a Docker workflow and produces the decoded web address https://qrcode-ai.com/.

Decode https://qrcode-ai.com/ from qr-reference.png

For qr-reference.png, the container outputs https://qrcode-ai.com/. Inspect the target domain carefully before choosing to open any URL.

Run flags, exit codes and container scope

Isolation and exit codes. Run with a read-only mount, dropped capabilities and --network none; check the Docker container run reference. Exit codes follow qrscan (0 decoded, 1 empty, 2 invalid input or mount), whereas Docker returns 125 to 127 on container startup failures.

Reproducible tags and MCP alternative. Pin the exact GHCR release tag or SHA-256 digest in CI configs. For AI assistant tool calls over Model Context Protocol instead of container jobs, see the QR Code Scanner MCP Server guide.

Documentation and licence. Read the distribution and install guide for current tags and digests, and the open-source scanner repository for source code and the MIT licence.

CLI, Docker, MCP server, skill or SDK: which QR code scanner fits?

The Docker image suits container jobs and reproducible CI runners. For another workflow, pick the matching guide below.

QR Code Scanner

Decode a single code right away in your browser with nothing to install.

Open QR code reader

QR Code Scanner CLI

Decode images inside a shell script or CI pipeline with a single command.

Explore QR Code Scanner CLI

QR Code Scanner MCP Server

Let an AI assistant decode an image locally through a structured tool call.

Explore QR Code Scanner MCP Server

QR Code Scanner Skills

Give an AI agent a repeatable local procedure for reading QR code images.

Explore QR Code Scanner Skills

QR Code Scanner SDK

Embed local QR code scanning directly inside your own application.

Explore scanner SDK

QR Code Scanner Docker questions

Image references, mounts, CPU architectures, errors and licensing.

The QR code scanner Docker image bundles a QR decoder together with its minimal runtime. QR Code AI’s open-source CLI image packages the qrscan executable: you mount the folder holding your QR images, the container decodes the target file and prints a JSON report. It does not expose a hosted endpoint, web UI or camera stream, and can access only the host folder you explicitly mount.

Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner with an explicit release tag from the GHCR package page, or pin its SHA-256 index digest for strict reproducibility. Store the image reference, architecture and run flags together in your job configuration.

Bind-mount the folder on your desktop or laptop containing the QR image and pass its container-side path, such as /input/qr-reference.png. A read-only mount is all that is needed. Because the container runs as a non-root user, verify the file has read permissions; mounting one folder never exposes the rest of your host filesystem.

The CLI container (ghcr.io/qrcode-ai-com/qrcode-barcode-scanner) does not: it runs qrscan on a mounted image and exits with no open port. If your architecture needs a self-hosted HTTP scanning endpoint, pull the separate ghcr.io/qrcode-ai-com/qrcode-barcode-scanner-http image from GHCR.

Yes for Linux amd64 and arm64. One multi-platform image index on GHCR covers both CPU architectures, and Docker automatically pulls the variant matching your host.

Inspect both the exit code and stdout report. Exit 0 means a detection, exit 1 means a valid empty scan and exit 2 flags invalid input or usage such as an unreadable file or missing mount. Docker emits its own startup failure codes from 125 to 127 before qrscan runs: 125 if docker run fails, 126 if the container command cannot be invoked and 127 if it cannot be found.

It returns whatever text was encoded: a URL, plain text or structured payload. The container writes it to stdout using the same JSON schema as qrscan, or as a terminal summary with --pretty. For instance, a plain-text QR holding Meeting point: North entrance returns those words, while a document or app-download QR returns its URL rather than the file. The container only prints that data and never opens links.

No. Successful decoding only proves data could be read from the image; it never certifies the target domain, verifies who generated the code or authorises a visit. The QR quality score estimates scannability as a software diagnostic and cannot guarantee results across every mobile camera or print surface.

No. Containerised image decoding is separate from QR Code AI’s creation platform and generation API. That service has free creation limits, a seven-day Premium trial triggered by the first dynamic QR code or Smart Link, and Premium requirements for continued use of affected features. Decoding an image starts no trial and alters no stored data, and the scanner container is open source under the MIT licence.