QR Code Scanner with Docker

Decode QR code images inside a pinned container image. Pass structured output cleanly into your batch jobs and CI pipelines.

  • GHCR

    CLI container image

    Check pull command

QR Code Scanner Docker at a glance

  • Published on GHCR and Artifact Hub

    CLI + HTTP

  • Linux platforms

    AMD64 + ARM64

  • Runs fully offline without network

    Offline

  • Open-source licence

    MIT

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.

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 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:

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

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

When 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.

Official container images and catalogues

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

GitHub Container Registry (CLI)

Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner anonymously for Linux AMD64 and ARM64. Pin a version tag or digest in CI pipelines and confirm user 65532 has read permission on the mounted directory.

Artifact Hub

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

HTTP Service Container (GHCR)

Deploy ghcr.io/qrcode-ai-com/qrcode-barcode-scanner-http when a self-hosted backend prefers calling a local HTTP scanning endpoint rather than running a one-shot CLI container.

Step-by-step guide to running the QR Code Scanner container

Pull the GHCR image, mount your image directory read-only and collect both the JSON output and exit status.

  1. Step 1

    Pull the container image

    Fetch ghcr.io/qrcode-ai-com/qrcode-barcode-scanner using a release tag or SHA-256 digest. The multi-platform index supports Linux AMD64 and ARM64.

  2. Step 2

    Mount your QR image folder

    Bind-mount the host folder read-only and pass the in-container path (for example /input/qr-reference.png). Confirm non-root user 65532 can read the image.

  3. Step 3

    Capture output and clean up

    Save stdout JSON to a file on the host, pass --rm to discard the stopped container, and distinguish qrscan exit codes (0, 1, 2) from Docker launch errors (125 to 127).

What a decoded QR code returns

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

A saved QR code image passes through a Docker container workflow to output the decoded value https://qrcode-ai.com/.

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

For qr-reference.png, the container returns https://qrcode-ai.com/. Always check the domain before visiting any decoded URL.

Runtime flags, exit codes and container scope

Sandboxing and exit codes. Run with a read-only bind mount, all capabilities dropped and --network none; consult Docker’s run reference. Exit statuses mirror qrscan (0 decoded, 1 empty scan, 2 invalid input or mount), while Docker uses 125 to 127 for container launch errors.

Pinned builds and MCP alternative. Lock an exact GHCR tag or SHA-256 digest inside CI definitions. If you need AI assistant tool calls via Model Context Protocol instead of container jobs, see the QR Code Scanner MCP Server guide.

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

CLI, Docker, MCP server, skill or SDK: choosing the right QR code scanner

Use the Docker image for containerised pipelines and consistent environments. For other needs, choose the matching guide.

QR Code Scanner

Scan a single code immediately in your browser with zero installation.

Open the QR code reader

QR Code Scanner CLI

Decode images inside a terminal script or CI job using one binary.

Explore QR Code Scanner CLI

QR Code Scanner Skills

Supply an AI agent with a consistent step-by-step image scanning workflow.

Explore QR Code Scanner Skills

QR Code Scanner SDK

Embed local scanning directly inside your app in your chosen language.

Explore the scanner SDK

QR Code Scanner Docker questions

Image reference, volume mounts, architectures, exit codes and licensing.

A QR code scanner Docker image packages a local QR decoder together with its runtime as a portable container. QR Code AI’s open-source image wraps the qrscan binary: you mount the folder holding your QR images, the container scans the requested file and prints a JSON report of the decoded data. It includes no web UI, hosted endpoint or webcam capture, and only sees the host path you explicitly mount.

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

Mount the host folder containing your QR image and supply its path inside the container, such as /input/qr-reference.png. A read-only mount is all that is needed. Because the container runs as a non-root user, make sure that user has read access to the file. Mounting a single folder keeps the rest of the host filesystem isolated.

No, the CLI image (ghcr.io/qrcode-ai-com/qrcode-barcode-scanner) executes qrscan on a mounted image and exits without binding any port. If your architecture needs a self-hosted HTTP scanning API, pull the dedicated ghcr.io/qrcode-ai-com/qrcode-barcode-scanner-http image from GHCR.

The published GHCR image covers Linux AMD64 and ARM64. A single multi-platform manifest serves both architectures, and Docker automatically fetches the variant matching your host.

Inspect both the exit status and the output report. Exit 0 indicates a detection and exit 1 denotes a valid scan with zero detections. Exit 2 signals invalid input or usage, such as a missing mount or unreadable file. Container-level failures come from Docker itself using exit codes 125 to 127 before qrscan starts: 125 when docker run fails, 126 when the command cannot be invoked and 127 when it is not found.

It returns whatever text is encoded in the symbol: a URL, plain text or structured data. The container writes this to stdout in the exact JSON report schema used by qrscan, or as a compact terminal summary with --pretty. For example, a plain-text QR code holding Meeting point: North entrance prints those exact words, and a code linking to a file or app returns its URL rather than downloading anything. The container never opens decoded links.

No. Decoding a QR code only proves that data was readable from the image. It does not validate the destination website, establish who placed the code or authorise visiting the link. The QR quality score is a software scannability diagnostic, not a guarantee across every mobile camera or print material.

No. Decoding an existing QR image is completely independent of the QR Code AI creation service and its generation API. The creation service has free creation limits, a seven-day Premium trial triggered when you create your first dynamic QR code or Smart Link, and Premium requirements for ongoing use of affected features. Reading a code never triggers that trial or modifies what is encoded. The container image is open source under the MIT licence.