如何将LAPI安装到docker容器中?
我刚刚开始使用名为Lapis的Lua框架,但在尝试将其安装到docker cointainer中时遇到了一个问题 我正在使用官方的OpenResty映像(jessie),并希望使用“luarocks install lapis”命令扩展我的Dockerfile 当我尝试构建映像时,出现以下错误:如何将LAPI安装到docker容器中?,docker,lua,openresty,luarocks,lapis,Docker,Lua,Openresty,Luarocks,Lapis,我刚刚开始使用名为Lapis的Lua框架,但在尝试将其安装到docker cointainer中时遇到了一个问题 我正在使用官方的OpenResty映像(jessie),并希望使用“luarocks install lapis”命令扩展我的Dockerfile 当我尝试构建映像时,出现以下错误: ERROR: Service 'nginx' failed to build: The command '/bin/sh -c luarocks install lapis' returned a no
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c luarocks install lapis' returned a non-zero code: 1
然后这个:
lapis 1.6.0-1 depends on lua-cjson (not installed)
Installing https://luarocks.org/lua-cjson-2.1.0-1.src.rock
lua_cjson.c:1298:13: error: static declaration of 'luaL_setfuncs' follows non-static declaration
static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup)
^
In file included from lua_cjson.c:44:0:
/usr/local/openresty/luajit/include/luajit-2.1/lauxlib.h:88:18: note: previous declaration of 'luaL_setfuncs' was here
LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);
^
Error: Failed installing dependency: https://luarocks.org/lua-cjson-2.1.0-1.src.rock - Build error: Failed compiling object lua_cjson.o
gcc -O2 -fPIC -I/usr/local/openresty/luajit/include/luajit-2.1 -c lua_cjson.c -o lua_cjson.o
导致错误的原因是什么?旧lua cjson似乎存在问题:您是否尝试过通过修改lapis rockspec切换到lua-cjson2?此外,它似乎在OpenResty 1.11.2.3中得到了修复,谢谢!我认为我无法修改lapis rockspec文件:(1.11.2.3版本给出了相同的错误。