首页 > 解决方案 > ingress-nginx:luarocks make:不允许操作

问题描述

NGINX 入口控制器版本:1.0.2

Kubernetes 版本:1.19.10

以前在 ingress-nginx-v1.0.0 上,我的 dockerfile 仍在工作:

FROM k8s.gcr.io/ingress-nginx/controller:v1.0.0@sha256:0851b34f69f69352bf168e6ccf30e1e20714a264ab1ecd1933e4d8c0fc3215c6

USER root

RUN apk update
RUN apk add unzip
RUN apk add make

RUN wget -O /tmp/luarocks.tgz \
  https://github.com/luarocks/luarocks/archive/refs/tags/v3.7.0.tar.gz \
  && tar -C /tmp -xzf /tmp/luarocks.tgz \
  && cd /tmp/luarocks* \
  && ./configure \
  && make install

RUN luarocks install lua-resty-http
RUN luarocks install lua-resty-session
RUN luarocks install lua-resty-jwt
RUN luarocks install lua-resty-openidc

COPY openidc.lua /usr/local/share/lua/5.1/resty
COPY nginx.tmpl /etc/nginx/template

现在使用最新的 v1.0.2,尝试 docker build 时出现此错误:

 => ERROR [ 5/11] RUN wget -O /tmp/luarocks.tgz   https://github.com/luarocks/luarocks/archive/refs/tags/v3.7.0.tar.gz   && tar -C /tmp -xzf /tmp/luarocks.tgz   && cd /tmp/lua  3.3s
------
 > [ 5/11] RUN wget -O /tmp/luarocks.tgz   https://github.com/luarocks/luarocks/archive/refs/tags/v3.7.0.tar.gz   && tar -C /tmp -xzf /tmp/luarocks.tgz   && cd /tmp/luarocks*   && ./configure   && make install:
#8 0.256 Connecting to github.com (140.82.121.4:443)
#8 0.505 Connecting to codeload.github.com (140.82.121.9:443)
#8 0.783 saving to '/tmp/luarocks.tgz'
#8 1.187 luarocks.tgz          927k --:--:-- ETA
#8 2.192 luarocks.tgz         2924k --:--:-- ETA
#8 3.124 luarocks.tgz         100% |********************************| 5259k  0:00:00 ETA
#8 3.124 '/tmp/luarocks.tgz' saved
#8 3.259
#8 3.259 Configuring LuaRocks version 3.7.0...
#8 3.259
#8 3.268 Lua version detected: 5.1
#8 3.268 Lua interpreter found: /usr/local/bin/luajit
#8 3.271 lua.h found: /usr/local/include/luajit-2.1/lua.h
#8 3.272 unzip found in PATH: /usr/bin
#8 3.274
#8 3.274 Done configuring.
#8 3.274
#8 3.275 LuaRocks will be installed at......: /usr/local
#8 3.275 LuaRocks will install rocks at.....: /usr/local
#8 3.277 LuaRocks configuration directory...: /usr/local/etc/luarocks
#8 3.277 Using Lua from.....................: /usr/local
#8 3.277
#8 3.278 * Type make and make install:
#8 3.278   to install to /usr/local as usual.
#8 3.278 * Type make bootstrap:
#8 3.278   to install LuaRocks into /usr/local as a rock.
#8 3.278
#8 3.279 make: find: Operation not permitted
#8 3.279 make: find: Operation not permitted
#8 3.279 make: find: Operation not permitted
#8 3.280 mkdir -p "build"
#8 3.280 make: /bin/sh: Operation not permitted
#8 3.280 make: *** [GNUmakefile:67: build/luarocks] Error 127
------
executor failed running [/bin/sh -c wget -O /tmp/luarocks.tgz   https://github.com/luarocks/luarocks/archive/refs/tags/v3.7.0.tar.gz   && tar -C /tmp -xzf /tmp/luarocks.tgz   && cd /tmp/luarocks*   && ./configure   && make install]: exit code: 2

为什么会出现“不允许操作”?

标签: dockernginxlua

解决方案


推荐阅读