HAProxy (lts-alpine) with Lua + LuaSec (ssl.https) for HTTPS from Lua scripts
194
HAProxy on Alpine with Lua 5.3 and LuaSec, so Lua scripts running inside HAProxy can make outbound HTTPS calls (ssl.https).
This image extends the official haproxy:lts-alpine3.21 image and adds a Lua 5.3 runtime plus the LuaSec library. LuaSec provides the ssl.https module, which lets Lua scripts loaded into HAProxy (via lua-load) perform TLS/HTTPS requests. The stock HAProxy image ships Lua but not LuaSec, so plain Lua can only do HTTP; this image fills that gap.
It is published to two Docker Hub repositories from the same build:
n8500x/haproxy-lua-alpinen8500x/haproxy-lua (equivalent tag / alias)# Pull (alpine-based)
docker pull n8500x/haproxy-lua-alpine
# Equivalent alias:
# docker pull n8500x/haproxy-lua
# Run with your own haproxy.cfg
docker run -d \
--name haproxy-lua \
-p 80:80 \
-v "$(pwd)/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro" \
n8500x/haproxy-lua-alpine
/usr/local/etc/haproxy/haproxy.cfg is the standard configuration path inherited from the official HAProxy base image. Mount your Lua scripts into the container as well and reference them from the config with lua-load, for example:
global
lua-load /etc/haproxy/lua/myscript.lua
docker run -d \
-p 80:80 \
-v "$(pwd)/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro" \
-v "$(pwd)/lua:/etc/haproxy/lua:ro" \
n8500x/haproxy-lua-alpine
haproxy:lts-alpine3.21 (HAProxy LTS on Alpine 3.21).lua5.3 — Lua 5.3 interpreter.lua-socket — LuaSocket, the networking layer LuaSec builds on.lua-sec and the luasec LuaRocks package — LuaSec, providing ssl.https for HTTPS requests from Lua.lua5.3-dev, openssl-dev, gcc, musl-dev, luarocks5.3.figlet — banner/text utility.The Dockerfile itself does not add an EXPOSE, custom entrypoint, or config file — it inherits all runtime defaults from the official HAProxy base image:
/usr/local/etc/haproxy/haproxy.cfg (base image default).haproxy.cfg binds (e.g. -p 80:80).Packages are installed as root during build (USER root).
docker build -t n8500x/haproxy-lua-alpine ./haproxy
lua-sec package and via luarocks-5.3 install luasec; the LuaRocks build is what guarantees an ssl.https-capable module for Lua 5.3.USER root for package installation and does not switch back, so it runs as root unless you override the user at runtime.haproxy.cfg; the image does not bundle an application configuration.Content type
Image
Digest
sha256:291023c98…
Size
22.9 MB
Last updated
20 days ago
docker pull n8500x/haproxy-lua