Sign inSign up

ragedunicorn/luacheck

By ragedunicorn

โ€ขUpdated 2 days ago

Public repository for ragedunicorn docker luacheck images

Image
Languages & frameworks
Integration & delivery
Developer tools
0

3.2K

ragedunicorn/luacheck repository overview

โ Luacheck Alpine Docker Image

Docker Luacheck

A lightweight Luacheck build on Alpine Linux for fast and efficient Lua code linting and static analysis.

โ Quick Start

# Pull latest version
docker pull ragedunicorn/luacheck:latest

# Or pull specific version (see the Tags tab for the available versions)
docker pull ragedunicorn/luacheck:<luacheck-version>-alpine<alpine-version>-<build>

# Run Luacheck
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest script.lua

On Windows, use the PowerShell form - ${PWD} with braces and the colon inside the quotes (without braces PowerShell parses $PWD: as a scope-qualified variable, as in $env:PATH, and rejects the argument):

# Run Luacheck
docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest script.lua

โ Features

  • ๐Ÿš€ Small footprint: ~15MB runtime image
  • ๐Ÿ“ฆ Luacheck: Latest stable version installed via LuaRocks
  • ๐Ÿ” Comprehensive analysis: Detects undefined globals, unused variables, unreachable code, and more
  • ๐Ÿ—๏ธ Multi-platform: Supports linux/amd64 and linux/arm64
  • โšก Fast: Pure Lua implementation with no external dependencies
  • ๐Ÿงต Parallel checking: Bundled lanes package enables luacheck -j N for large codebases
  • ๐Ÿ”’ Runs as non-root: Executes as nobody for security (required by lanes)

โ Supported Standards

Lua versions: Lua 5.1, 5.2, 5.3, 5.4, LuaJIT
Frameworks: Lร–VE, Minetest, Playdate SDK, OpenResty
Formatters: Default, Plain, TAP, JUnit, Visual Studio

โ Usage Examples

โ Lint entire project
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest .

PowerShell:

docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest .
โ Check specific Lua version compatibility
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest \
  --std lua53 src/

PowerShell:

docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest `
  --std lua53 src/
โ Ignore specific warnings
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest \
  --no-unused --no-redefined .

PowerShell:

docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest `
  --no-unused --no-redefined .
โ Generate CI reports
# JUnit format for CI systems
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest \
  --formatter JUnit . > luacheck-report.xml

# TAP format
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest \
  --formatter TAP .

PowerShell:

# JUnit format for CI systems
docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest `
  --formatter JUnit . > luacheck-report.xml

# TAP format
docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest `
  --formatter TAP .

The > redirect writes UTF-8 in PowerShell 7; Windows PowerShell 5.1 writes UTF-16, so pipe through Out-File -Encoding utf8 there instead.

โ Use configuration file
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest \
  --config .luacheckrc .

PowerShell:

docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest `
  --config .luacheckrc .
โ Parallel checking on large codebases
docker run -v $(pwd):/workspace ragedunicorn/luacheck:latest -j 4 .

PowerShell:

docker run -v "${PWD}:/workspace" ragedunicorn/luacheck:latest -j 4 .

Set -j to the number of CPU cores to use. Backed by the bundled lanes package.

โ File Permissions

The container runs as nobody (uid 65534). Files mounted at /workspace must be readable by that uid โ€” world-readable files (mode 644, the typical default) work out of the box. If your files are more restrictive, run as your own user:

docker run --rm --user $(id -u):$(id -g) \
  -v $(pwd):/workspace:ro ragedunicorn/luacheck:latest .

On Windows hosts this is not needed: Docker Desktop bind mounts do not carry Unix file ownership, so nobody can read mounted files without --user (and id does not exist in PowerShell). A read-only mount works the same way - keep the :ro suffix inside the quotes:

docker run --rm -v "${PWD}:/workspace:ro" ragedunicorn/luacheck:latest .

Lanes must be configured by an unprivileged uid; passing --user 0:0 (root) will cause luacheck -j N to fail. Any non-root uid works.

โ Tags

This image uses semantic versioning that includes all component versions:

Format: {luacheck_version}-alpine{alpine_version}-{build_number}

โ Version Examples

X.Y.Z is the Luacheck version, A.B.C the Alpine version:

  • X.Y.Z-alpineA.B.C-1 - First build of Luacheck X.Y.Z on Alpine A.B.C
  • X.Y.Z-alpineA.B.C-2 - Rebuild of same versions (bug fixes, optimizations)
  • X.Y.Z-alpineA.B.D-1 - Alpine Linux patch update
  • X.Y+1.0-alpineA.B.C-1 - Luacheck version update (build resets to 1)
  • X.Y.Z - Most recent build of Luacheck X.Y.Z
  • latest - Most recent stable release

The available versions are listed in the Tags tabโ .

When updates are available through automated dependency management, new releases are created with appropriate version tags.

โ License

MIT License - See GitHub repositoryโ  for details.

Tag summary

Content type

Image

Digest

sha256:4a802f842โ€ฆ

Size

4.1 MB

Last updated

2 days ago

docker pull ragedunicorn/luacheck