Hello everyone,
I’m working on a LUA script that utilizes RestApiGet(uri)
to retrieve data from a Postgres database, which is accessed via an API hosted on another container on the same server.
I am able to successfully retrieve the data using Postman, confirming that the API for Postgres is functioning correctly. However, it seems that RestApiGet
is designed to communicate only with Orthanc’s own uri
. When I attempt to use it to access the Postgres API, I encounter an issue related to the uri
.
Can anyone confirm if RestApiGet
and RestApiPost
are indeed limited to Orthanc URIs only?
If that’s the case, I attempted to install the Requests library for Lua using the following Dockerfile:
FROM jodogne/orthanc:1.12.3
COPY ./orthanc_01/usr_local_share_orthanc_plugins/. /usr/local/share/orthanc/plugins/
Install necessary packages
RUN apt update && apt upgrade -y
RUN apt install -y libssl-dev
RUN apt install -y lua5.3 luarocks lua5.3-dev
RUN luarocks --lua-version=5.3 install lua-requests
RUN luarocks --lua-version=5.3 install luasocket
However, I’m facing the following error:
W0831 05:56:14.267875 LUA-HEARTBEAT LuaContext.cpp:94] Lua says: Lua version: Lua 5.3
W0831 05:56:14.267942 LUA-HEARTBEAT LuaContext.cpp:94] Lua says: Lua version: Lua 5.3
E0831 05:56:14.270928 LUA-HEARTBEAT OrthancException.cpp:61] Cannot execute a Lua command: error loading module ‘socket.core’ from file ‘/usr/local/lib/lua/5.3/socket/core.so’:
/usr/local/lib/lua/5.3/socket/core.so: undefined symbol: lua_gettop
terminate called after throwing an instance of ‘Orthanc::OrthancException’
Does anyone have any suggestions on how to resolve this issue?
Many thanks!