tarantool / docker

Docker images for tarantool database
https://hub.docker.com/r/tarantool/tarantool
52 stars 25 forks source link

docker: module 'http.router' not found #213

Closed mrsuh closed 3 years ago

mrsuh commented 3 years ago

Hi I have an error when trying to run a simple server in docker with tarantool/tarantool How to reproduce:

local function handler(self) return self:render{ json = { ['Your-IP-Is'] = self:peer().host } } end

local server = require('http.server').new(nil, 8080) -- listen *:8080 local router = require('http.router').new({charset = "utf8"}) server:set_router(router) router:route({ path = '/' }, handler) server:start()


+ run `docker run --rm -t -i -v "$(pwd)"/test.lua:/opt/tarantool/test.lua tarantool/tarantool:2.8  tarantool /opt/tarantool/test.lua`

```bash
LuajitError: /opt/tarantool/test.lua:8: module 'http.router' not found:
        no field package.preload['http.router']
        no file '/opt/tarantool/http/router.lua'
        no file '/opt/tarantool/http/router/init.lua'
        no file '/opt/tarantool/http/router.so'
        no file '/opt/tarantool/.rocks/share/tarantool/http/router.lua'
        no file '/opt/tarantool/.rocks/share/tarantool/http/router/init.lua'
        no file '/opt/.rocks/share/tarantool/http/router.lua'
        no file '/opt/.rocks/share/tarantool/http/router/init.lua'
        no file '/.rocks/share/taranto
fatal error, exiting the event loop

idk where to place the issue, this is duplicate https://github.com/tarantool/http/issues/139

mrsuh commented 3 years ago

See https://github.com/tarantool/http/issues/139