Alpine-based image containing Lua and LuaRocks
950
Alpine Linux + Lua + LuaRocks
docker pull anibali/lua
$ docker run --rm -it anibali/lua
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> = 6 * 7
42
> os.exit(0)
When using LuaRocks, be aware that many modules require a compiler. This requires us to temporarily add a few extra packages to our image.
For example, if we wanted to add the "httpclient" and "lua-cjson" modules to our image then we would add the following to our Dockerfile:
RUN apk add --update gcc lua5.2-dev musl-dev git \
&& export C_INCLUDE_PATH=/usr/include/lua5.2/ \
&& luarocks install httpclient \
&& luarocks install lua-cjson \
&& apk del gcc lua5.2-dev musl-dev git \
&& rm -rf /var/cache/apk/*
Content type
Image
Digest
sha256:2f7ac50e6…
Size
4.5 MB
Last updated
over 10 years ago
docker pull anibali/lua