How to install Lapis into a docker container?

599 views Asked by At

I'm just getting started with the Lua framework called Lapis, but I encountered a problem when I tried to install it into a docker cointainer.

I’m using the official OpenResty image (jessie), and want to extendmy Dockerfile with a “luarocks install lapis” command.

When I try to build the image I get this error:

ERROR: Service 'nginx' failed to build: The command '/bin/sh -c luarocks install lapis' returned a non-zero code: 1

And then this one:

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

What causes the error?

0

There are 0 answers