Customize broken since luarocks-admin not on path
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 849
- PR merge metrics
- No merged PRs in 30d
Description
`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 https://github.com/Kong/docker-kong/commit/9cc3ca408efa65e4b558fb50165732f6a7c5e3b9 and https://github.com/Kong/docker-kong/commit/faf4f06d13999f3f91112e6bfa0423d550ce3cf1, but then removed in https://github.com/Kong/docker-kong/commit/9d58e4120cbd0bdbb3c26d9c093f387043998a88, 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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with customize/Dockerfile and the packer.lua call to luarocks-admin, then review commits 9cc3ca4, faf4f06, and 9d58e41 plus the test cases removed there. Reproduce the custom-image build with bundled plugins and determine whether the expected outcome is a working build or an explicit unsupported path. Done means the supported behavior is verified and covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, lua, shell
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100