QR Code Scanner with Docker

Decode QR code images inside a versioned Docker container. Feed structured results straight into your automated jobs and pipelines.

  • GHCR

    One-shot CLI container

    View the pull command
  • HTTP Service

    Self-hosted HTTP service

    View the HTTP container

QR Code Scanner Docker at a glance

  • Published on GHCR and Artifact Hub

    CLI + HTTP

  • Multi-platform Linux builds

    AMD64 + ARM64

  • Decodes without network access

    Offline

  • Open-source licence

    MIT

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.

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

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

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

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

Published container images and catalogues

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

GitHub Container Registry (CLI)

Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner with no account needed on Linux AMD64 and ARM64. Pin a release tag or digest in CI pipelines and check that user 65532 can read the mounted directory.

Artifact Hub

Inspect the verified-publisher catalogue listing on Artifact Hub to review published container 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 service prefers calling a local HTTP scanning endpoint rather than mounting files for a one-shot CLI container.

How to run the QR Code Scanner Docker container

Pull the GHCR image, mount your local image folder read-only and collect the JSON report alongside its 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. The multi-platform image covers Linux AMD64 and ARM64.

  2. Step 2

    Mount your QR image directory

    Bind-mount the host folder read-only and pass the file’s container path (such as /input/qr-reference.png). Make sure non-root user 65532 has read access to the file.

  3. Step 3

    Capture the report and exit cleanly

    Redirect the JSON output to a host file, include --rm so Docker removes the stopped container and separate qrscan exit codes (0, 1 or 2) from Docker start-up errors (125 to 127).

What a decoded QR code returns

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

A QR code image file passes through a Docker workflow to return the decoded address https://qrcode-ai.com/.

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

Given qr-reference.png, the container returns https://qrcode-ai.com/. Always inspect the domain before opening any decoded URL.

Run options, exit codes and container scope

Isolation and exit codes. Run the container with a read-only mount, all capabilities dropped and --network none; see the Docker run reference. Exit codes follow qrscan (0 for a detection, 1 for an empty scan and 2 for invalid input or an unreadable mount), whereas Docker returns 125 to 127 on container start-up failures.

Reproducible builds and MCP alternative. Pin the exact GHCR release tag or SHA-256 digest in your CI configuration. Where an AI assistant calls a scanning tool over the Model Context Protocol rather than running a container job, use the QR Code Scanner MCP Server guide.

Documentation and licence. Consult the distribution guide for current release tags and digests, and the scanner repository for source code and the MIT licence.

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

Use the Docker container for isolated jobs and reproducible Linux environments. For other tasks, pick the matching guide below.

QR Code Scanner

Decode a single QR code straight away, directly in your browser. No account needed and nothing to install.

Open the online QR code reader

QR Code Scanner CLI

Scan QR code images from a shell script or CI pipeline using one local command.

Explore QR Code Scanner CLI

QR Code Scanner Skills

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

Explore QR Code Scanner Skills

QR Code Scanner SDK

Embed local QR code scanning directly inside your own software, in your language.

Explore QR Code Scanner SDK

QR Code Scanner Docker questions

Image references, host mounts, CPU architectures, exit codes and licensing.

The QR code scanner Docker image bundles a QR code decoder and its runtime as a self-contained container image. QR Code AI’s open-source image packages the qrscan command: mount the folder holding your QR code files, and the container reads the target file and prints a report with the decoded content. It does not expose a hosted endpoint, a browser interface or a webcam stream, and it can access only the host files you mount.

Pull ghcr.io/qrcode-ai-com/qrcode-barcode-scanner using an explicit release tag from the GHCR package page, or pin its SHA-256 index digest for strict reproducibility. Record the image tag or digest, target CPU architecture and container run options together in your pipeline configuration.

Mount the directory on your local machine that holds the QR image file and pass its path inside the container, for example /input/qr-reference.png. A read-only mount is all that is needed. Because the container runs as a non-root user (UID 65532), make sure the mounted file is readable by that user. Mounting a single folder keeps the rest of your host filesystem isolated.

The CLI Docker image (ghcr.io/qrcode-ai-com/qrcode-barcode-scanner) does not: it runs qrscan against a mounted file and exits without opening a listening port. If your workflow requires 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. A single multi-platform manifest covers both architectures, so Docker automatically pulls the variant that matches your host.

Inspect both the exit code and the scan report. Exit 1 signals a valid empty scan with no detections, whereas exit 0 means at least one code was decoded. Exit 2 reports invalid input or usage, such as a missing mount or an unreadable file. Container runtime failures happen before qrscan starts and return Docker’s own exit codes, 125 to 127: 125 when docker run itself fails, 126 when the command inside the container cannot be invoked and 127 when it cannot be found.

It returns the exact content encoded in the symbol: a web address, plain text or structured data. The container writes it to standard output in the same JSON report format as the qrscan CLI, or as a terminal summary when you pass --pretty. For example, a plain-text QR code holding “Meeting point: North entrance” returns those words, while a code linking to a document or app download returns its URL rather than the file. The container prints the decoded content and never opens the address.

No. Successful decoding shows only that the image contained readable data. It does not verify the linked website, confirm who created the code or authorise a visit. The QR quality score indicates how reliably a symbol decodes; it is a software diagnostic rather than a guarantee across every mobile phone camera or printed label.

No. Containerised scanning of existing images is completely separate from the QR Code AI creation platform and its generation API. That creation service has free creation limits and a seven-day Premium trial triggered by creating the first dynamic QR code or Smart Link; Premium is required to continue using the affected features afterwards. Scanning an image never consumes generation credits, starts a trial or alters what is encoded in the code. The scanner container image is open source under the MIT licence.