lua-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
来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速