
nickblah/lualua-docker 是一系列针对不同 Lua 版本的最小化、自动化且持续更新的 Docker 镜像。该项目旨在提供简洁、可靠的 Lua 运行环境,支持多种基础操作系统和版本组合,满足不同场景下的开发、测试和生产需求。
5, 5-debian, 5-trixie, 5.4, 5.4-debian, 5.4-trixie, 5.4.8, 5.4.8-debian, 5.4.8-trixie, debian, latest
Dockerfile
5-bookworm, 5.4-bookworm, 5.4.8-bookworm
Dockerfile
5-luarocks, 5-luarocks-debian, 5-luarocks-trixie, 5.4-luarocks, 5.4-luarocks-debian, 5.4-luarocks-trixie, 5.4.8-luarocks, 5.4.8-luarocks-debian, 5.4.8-luarocks-trixie, luarocks, luarocks-debian
Dockerfile
5-luarocks-bookworm, 5.4-luarocks-bookworm, 5.4.8-luarocks-bookworm
Dockerfile
5-alpine, 5-alpine3, 5-alpine3.22, 5.4-alpine, 5.4-alpine3.22, 5.4.8-alpine, 5.4.8-alpine3, 5.4.8-alpine3.22, alpine
Dockerfile
5-alpine3.21, 5.4-alpine3.21, 5.4.8-alpine3.21
Dockerfile
5-luarocks-alpine, 5-luarocks-alpine3, 5-luarocks-alpine3.22, 5.4-luarocks-alpine, 5.4-luarocks-alpine3.22, 5.4.8-luarocks-alpine, 5.4.8-luarocks-alpine3, 5.4.8-luarocks-alpine3.22, luarocks-alpine
Dockerfile
5-luarocks-alpine3.21, 5.4-luarocks-alpine3.21, 5.4.8-luarocks-alpine3.21
Dockerfile
5-rolling, 5.4-rolling, 5.4.8-rolling
Dockerfile
5-plucky, 5.4-plucky, 5.4.8-plucky
Dockerfile
5-luarocks-rolling, 5.4-luarocks-rolling, 5.4.8-luarocks-rolling
Dockerfile
5-luarocks-plucky, 5.4-luarocks-plucky, 5.4.8-luarocks-plucky
Dockerfile
5.3, 5.3-debian, 5.3-trixie, 5.3.6, 5.3.6-debian, 5.3.6-trixie
Dockerfile
5.3-bookworm, 5.3.6-bookworm
Dockerfile
5.3-luarocks, 5.3-luarocks-debian, 5.3-luarocks-trixie, 5.3.6-luarocks, 5.3.6-luarocks-debian, 5.3.6-luarocks-trixie
Dockerfile
5.3-luarocks-bookworm, 5.3.6-luarocks-bookworm
Dockerfile
5.3-alpine, 5.3-alpine3.22, 5.3.6-alpine, 5.3.6-alpine3, 5.3.6-alpine3.22
Dockerfile
5.3-alpine3.21, 5.3.6-alpine3.21
Dockerfile
5.3-luarocks-alpine, 5.3-luarocks-alpine3.22, 5.3.6-luarocks-alpine, 5.3.6-luarocks-alpine3, 5.3.6-luarocks-alpine3.22
Dockerfile
5.3-luarocks-alpine3.21, 5.3.6-luarocks-alpine3.21
Dockerfile
5.3-rolling, 5.3.6-rolling
Dockerfile
5.3-plucky, 5.3.6-plucky
Dockerfile
5.3-luarocks-rolling, 5.3.6-luarocks-rolling
Dockerfile
5.3-luarocks-plucky, 5.3.6-luarocks-plucky
Dockerfile
5.2, 5.2-debian, 5.2-trixie, 5.2.4, 5.2.4-debian, 5.2.4-trixie
Dockerfile
5.2-bookworm, 5.2.4-bookworm
Dockerfile
5.2-luarocks, 5.2-luarocks-debian, 5.2-luarocks-trixie, 5.2.4-luarocks, 5.2.4-luarocks-debian, 5.2.4-luarocks-trixie
Dockerfile
5.2-luarocks-bookworm, 5.2.4-luarocks-bookworm
Dockerfile
5.2-alpine, 5.2-alpine3.22, 5.2.4-alpine, 5.2.4-alpine3, 5.2.4-alpine3.22
Dockerfile
5.2-alpine3.21, 5.2.4-alpine3.21
Dockerfile
5.2-luarocks-alpine, 5.2-luarocks-alpine3.22, 5.2.4-luarocks-alpine, 5.2.4-luarocks-alpine3, 5.2.4-luarocks-alpine3.22
Dockerfile
5.2-luarocks-alpine3.21, 5.2.4-luarocks-alpine3.21
Dockerfile
5.2-rolling, 5.2.4-rolling
Dockerfile
5.2-plucky, 5.2.4-plucky
Dockerfile
5.2-luarocks-rolling, 5.2.4-luarocks-rolling
Dockerfile
5.2-luarocks-plucky, 5.2.4-luarocks-plucky
Dockerfile
nickblah/lua:<version>nickblah/lua:<version>-alpinenickblah/lua:<version>-luarocksnickblah/lua:<version>-luarocks-alpineLua 应用开发环境
提供隔离的 Lua 版本环境,支持快速切换 Lua 版本和基础系统。
CI/CD 流程集成
在自动化构建、测试流程中作为 Lua 运行环境,确保环境一致性。
轻量级生产部署
基于 Alpine 变体的小体积特性,适合容器化生产部署。
Lua 版本兼容性测试
便捷测试应用在不同 Lua 版本(5.4/5.3/5.2)下的兼容性。
LuaRocks 包管理场景
通过 -luarocks 变体快速安装和管理 Lua 第三方库。
bash# 使用最新版(默认 Debian 基础) docker run -it --rm nickblah/lua lua # 使用特定版本(如 Lua 5.4 Alpine 变体) docker run -it --rm nickblah/lua:5.4-alpine lua
假设本地脚本路径为 ./script.lua:
bash# 挂载当前目录并运行脚本 docker run -it --rm -v "$(pwd)":/app -w /app nickblah/lua lua script.lua # 使用 Lua 5.3 版本 docker run -it --rm -v "$(pwd)":/app -w /app nickblah/lua:5.3 lua script.lua
以安装 luasocket 为例:
bash# 使用 Debian LuaRocks 变体 docker run -it --rm nickblah/lua:luarocks luarocks install luasocket # 使用 Alpine LuaRocks 变体 docker run -it --rm nickblah/lua:luarocks-alpine luarocks install luasocket
创建 docker-compose.yml:
yamlversion: '3' services: lua-app: image: nickblah/lua:5.4-luarocks-alpine volumes: - ./app:/app working_dir: /app command: lua main.lua
启动服务:
bashdocker-compose up
基础镜像为最小化设计,如需安装含 C 扩展的 LuaRocks 模块(如 luasocket、lua-cjson),需先安装构建工具链:
bashdocker run -it --rm nickblah/lua:luarocks sh -c " apt-get update && apt-get install -y build-essential && \ luarocks install luasocket "
bashdocker run -it --rm nickblah/lua:luarocks-alpine sh -c " apk add --no-cache build-base && \ luarocks install luasocket
manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务