{"id":30138568,"url":"https://github.com/ragedunicorn/docker-luacheck","last_synced_at":"2026-05-16T11:31:41.802Z","repository":{"id":306491363,"uuid":"1026195077","full_name":"RagedUnicorn/docker-luacheck","owner":"RagedUnicorn","description":"Repository for Docker luacheck image based on Alpine","archived":false,"fork":false,"pushed_at":"2026-05-08T18:21:10.000Z","size":134,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-08T19:31:13.928Z","etag":null,"topics":["alpine","alpine-linux","docker","docker-image","luacheck"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/ragedunicorn/luacheck","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RagedUnicorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-25T13:19:12.000Z","updated_at":"2026-05-08T17:32:05.000Z","dependencies_parsed_at":"2025-07-26T02:28:20.771Z","dependency_job_id":"caf6e837-0892-45ee-93bc-8aa60dab68ec","html_url":"https://github.com/RagedUnicorn/docker-luacheck","commit_stats":null,"previous_names":["ragedunicorn/docker-luacheck"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/RagedUnicorn/docker-luacheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-luacheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-luacheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-luacheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-luacheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RagedUnicorn","download_url":"https://codeload.github.com/RagedUnicorn/docker-luacheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-luacheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","alpine-linux","docker","docker-image","luacheck"],"created_at":"2025-08-11T01:37:15.500Z","updated_at":"2026-05-16T11:31:41.797Z","avatar_url":"https://github.com/RagedUnicorn.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-luacheck\n\n![](./docs/docker_luacheck.png)\n\n[![Release Build](https://github.com/RagedUnicorn/docker-luacheck/actions/workflows/docker_release.yml/badge.svg)](https://github.com/RagedUnicorn/docker-luacheck/actions/workflows/docker_release.yml)\n[![Test](https://github.com/RagedUnicorn/docker-luacheck/actions/workflows/test.yml/badge.svg)](https://github.com/RagedUnicorn/docker-luacheck/actions/workflows/test.yml)\n![License: MIT](docs/license_badge.svg)\n\n\u003e Docker Alpine image with Luacheck - A tool for linting and static analysis of Lua code.\n\n![](./docs/alpine_linux_logo.svg)\n\n## Overview\n\nThis Docker image provides a lightweight Luacheck installation on Alpine Linux. Luacheck is a static analyzer and a linter for Lua that detects various issues such as usage of undefined global variables, unused variables and values, accessing uninitialized variables, unreachable code and more.\n\n## Features\n\n- **Small footprint**: ~15MB runtime image using Alpine Linux\n- **Luacheck 1.2.0**: Latest stable version\n- **Multi-stage build**: Optimized for minimal final image size\n- **Volume mounting**: Easy file input through `/workspace`\n- **Parallel checking**: Bundled `lanes` package enables `luacheck -j N` for large codebases\n- **Runs as non-root**: Container executes as `nobody` (required by `lanes`, also a security best practice)\n\n## Quick Start\n\n```bash\n# Pull the image\ndocker pull ragedunicorn/luacheck:latest\n\n# Run Luacheck on a single file\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest myfile.lua\n\n# Run Luacheck on a directory\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest .\n```\n\nFor development and building from source, see [DEVELOPMENT.md](DEVELOPMENT.md).\n\n## Usage\n\nThe container uses Luacheck as the entrypoint, so any Luacheck parameters can be passed directly to the `docker run` command.\n\n### Basic Usage\n\n```bash\n# Using latest version\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest [luacheck-options]\n\n# Using specific Luacheck version (latest Alpine build)\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:1.2.0 [luacheck-options]\n\n# Using exact version combination\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:1.2.0-alpine3.22.1-1 [luacheck-options]\n```\n\n### Examples\n\n#### Check a Single File\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest myfile.lua\n```\n\n#### Check All Lua Files in Directory\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest .\n```\n\n#### Check with Custom Configuration\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --config .luacheckrc .\n```\n\n#### Generate Report in Different Format\n```bash\n# TAP format\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --formatter TAP .\n\n# JUnit XML format\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --formatter JUnit .\n\n# JSON format\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --formatter json .\n```\n\n#### Ignore Specific Warnings\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --ignore 212 --ignore 213 .\n```\n\n#### Set Global Variables\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest --globals love --globals game .\n```\n\n#### Parallel Checking on Large Codebases\nThe image bundles the `lanes` package, so Luacheck's `-j` flag works out of the box:\n\n```bash\ndocker run -v $(pwd):/workspace ragedunicorn/luacheck:latest -j 4 .\n```\n\nSet `-j` to the number of CPU cores you want to use. On large codebases this reduces wall-clock time roughly linearly with core count.\n\n## File Permissions\n\nThe container runs as the unprivileged `nobody` user (uid 65534). This is required for `lanes` to start (Luacheck's parallel mode), and is also a security best practice.\n\nFiles mounted at `/workspace` must be readable by `nobody`. World-readable files (the typical default, mode `644`) work without further configuration. If your files have restrictive permissions and you see `Permission denied` errors, run the container as your own user instead:\n\n```bash\ndocker run --rm --user $(id -u):$(id -g) -v $(pwd):/workspace:ro ragedunicorn/luacheck:latest .\n```\n\nNote: Lanes must be configured by an unprivileged uid, so passing `--user 0:0` (root) will cause `luacheck -j N` to fail. Any non-root uid works.\n\n## Docker Compose Usage\n\nThis repository includes Docker Compose configurations for easier usage and common linting workflows.\n\n### Basic Setup\n\n1. Place your Lua files in your project directory\n\n2. Run Luacheck using docker compose:\n```bash\ndocker compose run --rm luacheck .\n```\n\n### Example Configurations\n\nThe `examples/` directory contains specialized docker-compose files for common tasks:\n\n#### Project Linting (`examples/docker-compose.lint.yml`)\n```bash\n# Lint entire project\ndocker compose -f examples/docker-compose.lint.yml run --rm lint-project\n\n# Lint with strict settings\ndocker compose -f examples/docker-compose.lint.yml run --rm lint-strict\n\n# Lint specific standards (Lua 5.1, 5.2, 5.3, etc.)\ndocker compose -f examples/docker-compose.lint.yml run --rm lint-lua53\n```\n\n#### CI/CD Integration (`examples/docker-compose.ci.yml`)\n```bash\n# Generate JUnit report for CI\ndocker compose -f examples/docker-compose.ci.yml run --rm ci-junit\n\n# Generate JSON report\ndocker compose -f examples/docker-compose.ci.yml run --rm ci-json\n\n# Check with exit code only\ndocker compose -f examples/docker-compose.ci.yml run --rm ci-check\n```\n\n### Environment Variables\n\nThe compose services support environment variables for customization:\n\n- `LUACHECK_VERSION`: Specify Luacheck image version (default: latest)\n- `LUACHECK_CONFIG`: Path to .luacheckrc file\n- `LUACHECK_GLOBALS`: Comma-separated list of allowed globals\n- See individual compose files for more options\n\n### Tips\n\n1. **Custom Commands**: Override the default command:\n   ```bash\n   docker compose run --rm luacheck --std lua53 --globals love .\n   ```\n\n2. **Configuration File**: Create a `.luacheckrc` file in your project root for persistent settings\n\n3. **Persistent Settings**: The repository includes a `.env` file with default settings\n\n## Configuration\n\nLuacheck can be configured using a `.luacheckrc` file. Here's an example:\n\n```lua\nreturn {\n    std = \"lua53\",\n    globals = {\n        \"love\",\n        \"game\"\n    },\n    ignore = {\n        \"212\", -- Unused argument\n        \"213\", -- Unused loop variable\n    },\n    files = {\n        [\"tests/\"] = {\n            std = \"+busted\"\n        }\n    }\n}\n```\n\n## Versioning\n\nThis project uses semantic versioning that matches the Docker image contents:\n\n**Format:** `{luacheck_version}-alpine{alpine_version}-{build_number}`\n\nExamples:\n- `1.2.0-alpine3.22.1-1` - Luacheck 1.2.0 on Alpine 3.22.1, build 1\n- `latest` - Most recent stable release\n\nFor detailed release process and versioning guidelines, see [RELEASE.md](RELEASE.md).\n\n## Automated Dependency Updates\n\nThis project uses [Renovate](https://docs.renovatebot.com/) to automatically check for updates to:\n- Alpine Linux base image version\n- Luacheck version\n\nRenovate runs weekly and creates pull requests when updates are available.\n\n## Documentation\n\n- [Development Guide](DEVELOPMENT.md) - Building, debugging, and contributing\n- [Testing Guide](TEST.md) - Running and writing tests\n- [Release Process](RELEASE.md) - Creating releases and versioning\n\n## Links\n\n- [Luacheck Documentation](https://luacheck.readthedocs.io/)\n- [Alpine Linux](https://www.alpinelinux.org/)\n\n# License\n\nMIT License\n\nCopyright (c) 2026 Michael Wiesendanger\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fdocker-luacheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragedunicorn%2Fdocker-luacheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fdocker-luacheck/lists"}