公司代理限制下,如何在Debian Docker容器手动安装lua-resty-openidc
问题背景与疑问
环境限制
- 基于
debian:bullseye-slim的Docker容器 - 公司代理屏蔽了GitHub与LuaRocks,需手动安装Lua包
lua-resty-openidc
当前操作及报错
尝试通过以下命令安装apiclient:
RUN set luarocks make apiclient-2.6.0-2.rockspec
在公司构建服务器上触发报错:
luarocks make apiclient-2.6.0-2.rockspec Missing dependencies for apiclient 2.6.0-2: lua-resty-openidc ~> 1.7.6 (not installed) apiclient 2.6.0-2 depends on lua ~> 5.1 (5.1-1 provided by VM) apiclient 2.6.0-2 depends on lua-resty-openidc ~> 1.7.6 (not installed) Warning: Failed searching manifest: Failed downloading https://luarocks.org/manifest-5.1 - failed downloading https://luarocks.org/manifest-5.1 ... Error: Could not satisfy dependency lua-resty-openidc ~> 1.7.6: No results matching query were found for Lua 5.1.
本地已尝试的操作
本地MacBook无代理限制,已成功构建容器,执行过以下步骤:
- 用
grep -rl openidc /查找lua-resty-openidc相关文件 - 将找到的文件复制到本地目录
- 构建时将文件复制到容器中
但构建服务器上构建时,Lua仍会尝试联网下载lua-resty-openidc。
待解决问题
- 完全手动安装
lua-resty-openidc还需要哪些文件? - 是否可以让LuaRocks使用本地缓存
/root/.cache/luarocks?如果可行,需要哪些缓存文件?
内容的提问来源于stack exchange,提问作者mles
相关产品推荐
相关产品推荐

