QR Code Scanner with Docker

Read QR code images in a versioned container. Feed decoded content into your jobs and pipelines.

  • GHCR

    CLI container image

    See the pull command

QR Code Scanner Docker at a glance

  • Published on GHCR and Artifact Hub

    CLI + HTTP

  • Linux platforms

    AMD64 + ARM64

  • Scans without network access

    Offline

  • Open-source license

    MIT

Pull the container image and read your first QR code image

The QR Code Scanner container image is published by QR Code AI on the GitHub Container Registry (GHCR) and indexed on Artifact Hub as a verified publisher. The CLI image packages qrscan for Linux AMD64 and ARM64: it reads mounted files and prints a report without network access. A separate GHCR image provides a self-hosted HTTP scanning service when a job prefers HTTP calls over CLI execution.

Pull the container image and read the public sample

The first command downloads a public QR code sample into the current directory as clean-qr.png. The docker commands pull the multi-platform GHCR CLI image and scan 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

The run mounts the current directory read-only, drops every capability and disables the network. --pretty prints a terminal summary of the first detection. qrscan has three profiles: full, the default, computes the QR quality score at full depth, fast computes it at reduced depth and frame only decodes.

The commands in this guide are written for a POSIX shell such as bash or zsh.

The same container image also reads barcodes: see the Barcode Scanner Docker guide.

What you get

The container image packages the same qrscan command, so it prints the same result as the CLI. For that 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 time on the last line depends on your machine.

Save the JSON report on the host

To read your own image, here qr-reference.png, put it in the directory you mount. Without --pretty, qrscan prints the complete scan report as JSON. Redirect it to a file on the host: 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 the code in qr-reference.png encodes https://qrcode-ai.com/, the report contains that address.

The QR Code Scanner CLI guide lists every option.

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

Published container images and catalogs

Pull the MIT-licensed CLI or HTTP service image 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 release tag or digest in automated pipelines and ensure user 65532 can read the mounted directory.

Artifact Hub

Browse the verified-publisher listing on Artifact Hub to inspect published 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 workflow calls a local HTTP scanning endpoint instead of mounting files for a one-shot CLI run.

How to run the QR Code Scanner container

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

  1. Step 1

    Pull the container image

    Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner by release tag or SHA-256 index digest. Multi-platform builds cover Linux AMD64 and ARM64.

  2. Step 2

    Mount your QR image file

    Mount the host folder read-only and pass its container path (such as /input/qr-reference.png). Ensure non-root user 65532 can read the file.

  3. Step 3

    Collect the result and end the run

    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–127).

What a decoded QR code gives you

The container prints the same JSON report as qrscan, with content.text and payload.kind per detection, and never opens decoded links.

An image file containing a QR code connects through a Docker workflow to the decoded value https://qrcode-ai.com/.

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

For qr-reference.png, the container prints https://qrcode-ai.com/. Check the domain before opening any decoded URL.

Run options, exit codes and container image scope

Isolation and exit codes. Run with a read-only mount, no capabilities and --network none; see Docker’s run reference. Exit codes match qrscan (0 decoded, 1 empty, 2 invalid input/mount), while Docker returns 125–127 on container startup failures.

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

Documentation and license. Read the distribution guide for current tags and digests, and the scanner repository for source code and the MIT license.

CLI, Docker, MCP server, skill or SDK: which QR code scanner tool do you need?

The Docker image fits container jobs and identical environments. For another task, choose the matching guide.

QR Code Scanner

Read one code right now, in your browser. Nothing to install.

Open the QR code reader

QR Code Scanner CLI

Check images in a script or a CI job with one command.

Explore QR Code Scanner CLI

QR Code Scanner SDK

Build scanning into your own application, in your language.

Explore the scanner SDK

QR Code Scanner Docker questions

Image name, mounts, architectures, errors and licensing.

A QR code scanner Docker image provides a QR code decoder and its runtime, packaged as a container image. QR Code AI’s open-source image packages the qrscan command: you mount the folder that holds your QR image files, the container reads the file you name and prints a report with the decoded content. It does not provide a hosted endpoint, a browser interface or a webcam stream, and it reaches only the host files you 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). Keep the tag or digest, architecture and run options together in your job configuration.

Mount the host directory that holds the QR image file and pass its container-side path, for example /input/qr-reference.png. A read-only mount is enough. The container runs as a non-root user, so the file must be readable by it. Mounting one directory does not expose the rest of the host filesystem.

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

The published GHCR container image supports Linux AMD64 and ARM64. One multi-platform index covers both, and Docker selects the variant that matches the host.

Check the exit code and the report. Exit 0 means a detection and exit 1 a valid scan with no detections. Exit 2 means invalid input or usage, such as a missing mount or an unreadable file. Docker reports its own failures with exit codes 125 to 127, before the scanner runs: 125 when docker run itself fails, 126 when the command in the container cannot be invoked and 127 when it cannot be found.

The text that was encoded: an address, plain text or structured data. The container prints it on standard output, in the same JSON report as the qrscan CLI, or in a terminal summary with --pretty. For example, a plain-text code containing Meeting point: North entrance returns those words, and a code that points to a document or an app download returns its URL, not the file. The container only prints that content: it never opens the address.

No. Successful decoding means content could be read from the image. It does not certify the linked website, establish who placed the code or authorize a visit. The QR quality score describes how reliably a design reads; it is a software diagnostic, not a guarantee for every camera or printed code.

No. Decoding an existing image is separate from the QR Code AI creation service and its 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. Reading a code does not start that trial, and it never changes what is encoded in a code. The scanner container is open source under the MIT license.