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

help request: 我要通过源码启动的方式部署一个apisix镜像,过程好艰难。版本是2.10 #11630

Open
xie900610 opened this issue Oct 9, 2024 · 2 comments
Labels
question label for questions asked by users

Comments

@xie900610
Copy link

Description

lua /usr/local/apisix/apisix/cli/apisix.lua start
lua: [string "context=... or {}..."]:1037: attempt to index global 'item' (a nil value)
stack traceback:
[string "context=... or {}..."]:1037: in function 'conf_render'
/usr/share/lua/5.1/apisix/cli/ops.lua:797: in function 'init'
/usr/share/lua/5.1/apisix/cli/ops.lua:870: in function '?'
/usr/share/lua/5.1/apisix/cli/ops.lua:959: in function 'execute'
/usr/local/apisix/apisix/cli/apisix.lua:34: in main chunk
[C]: ?
目前遇到了这个困难,有人帮忙解答下吗?
下面是我的dockerfile部分内容:
RUN yum install yum-utils
RUN yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
RUN yum install -y make wget tar openresty curl git gcc lua-devel sudo unzip which
COPY ./Makefile /usr/local/apisix/
COPY ./luarocks-3.4.0.tar.gz /usr/local/apisix/
COPY ./NOTICE /usr/local/apisix/
COPY ./LICENSE /usr/local/apisix/
COPY ./README.md /usr/local/apisix/
COPY ./rockspec /usr/local/apisix/rockspec/
COPY ./conf /usr/local/apisix/conf/
COPY ./bin /usr/local/apisix/bin/
COPY ./apisix /usr/local/apisix/apisix/
COPY ./ci /usr/local/apisix/ci/
COPY ./utils /usr/local/apisix/utils/

设置 LuaRocks 服务器

WORKDIR /usr/local/apisix

设置 LuaRocks 服务器

ENV LUAROCKS_SERVER=https://luarocks.cn
RUN sh ./utils/linux-install-luarocks.sh
RUN git config --global url."https://".insteadOf git://

安装依赖

RUN make deps

安装 APISIX

RUN make install

设置工作目录

启动 APISIX 并监控日志

ENTRYPOINT ["/usr/bin/apisix", "start"]

Environment

  • APISIX version (run apisix version):2.10
  • Operating system 5.10.134-16.1.al8.x86_64 change: added doc of how to load plugin. #1 SMP Thu Dec 7 14:11:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • openresty/1.25.3.2
  • etcd version: 远程服务
  • APISIX Dashboard version, if relevant:无
  • Plugin runner version, for issues related to plugin runners:无
  • LuaRocks version, for installation issues (run luarocks --version):
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Apache APISIX backlog Oct 9, 2024
@dosubot dosubot bot added the question label for questions asked by users label Oct 9, 2024
@flylan
Copy link

flylan commented Nov 7, 2024

既然要自己编译一个,为啥不直接抄官方的dockerfile?

@xie900610
Copy link
Author

既然要自己编译一个,为啥不直接抄官方的dockerfile?

官方没有提供基于源码的dockerfile吧?如果有的话辛苦贴下链接感激不尽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question label for questions asked by users
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants