Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize broken since luarocks-admin not on path #681

Open
morvaiff opened this issue Nov 2, 2023 · 3 comments
Open

Customize broken since luarocks-admin not on path #681

morvaiff opened this issue Nov 2, 2023 · 3 comments
Labels

Comments

@morvaiff
Copy link

morvaiff commented Nov 2, 2023

customize/Dockerfile cannot be used to build custom Kong images with additional bundled plugins from a curated list, since packer.lua invokes luarocks-admin in a shell, but the tool is not available on the system path.

********************************************************************************
*                            Set up LuaRocks server                            *
********************************************************************************
[packer exec] luarocks-admin make_manifest /rocks-server
sh: 1: luarocks-admin: not found
/usr/local/openresty/luajit/bin/luajit: /packer.lua:249: 127
stack traceback:
        [C]: in function 'assert'
        /packer.lua:249: in function 'start_rocks_server'
        /packer.lua:285: in main chunk
        [C]: at 0x5620da6e5450
The command '/bin/sh -c /usr/local/openresty/luajit/bin/luajit /packer.lua -- "$INJECTED_PLUGINS"' returned a non-zero code: 1

I see this was addressed in 9cc3ca4 and faf4f06, but then removed in 9d58e41, together with some test cases.

Shouldn't the luarocks-admin symbolic link in /usr/local/bin be included after all (either as in the above commits, or in the build stage of customize/Dockerfile)? Or does the removal of tests indicate that creating custom images this way is no longer supported?

@francescoVenuto
Copy link

Good evening, I encountered the same issue while trying to create a custom Kong image with the kong-oidc plugin. The Kong version is 3.8 (latest). Has anyone managed to resolve this and could provide guidance on building the images? Thank you very much, looking forward to your response.
Francesco

@francescoVenuto
Copy link

Solved... I had "simply" cloned the git repository... downloading the zip works!!!!! this is obviously absurd... at least to me. Tragic experience... we didn't start off well...

@Tieske
Copy link
Member

Tieske commented Nov 8, 2024

This was fixed a while ago: Kong/kong#13372

If you accidentally run into it here's a one-liner that should fix it:

sed 's#/bin/luarocks'\''#/bin/luarocks-admin'\''#' /usr/local/bin/luarocks > /usr/local/bin/luarocks-admin && chmod +x /usr/local/bin/luarocks-admin

It takes the luarocks wrapper script, copies it to luarocks-admin and replaces all occurrences of luarocks to luarocks-admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants