【发布时间】:2021-07-18 16:07:28
【问题描述】:
我尝试从 alpine:3.14 编译 docker 映像。
错误如下
make -f objs/Makefile
make: make: Operation not permitted
make: *** [Makefile:10: build] Error 127
然后切换到alpine:3.12、alpine:3.13 and版本发现都OK了!
以下是我基于alpine:3.14版本编译NGINX的关键问题代码
# Omit irrelevant code
RUN \
addgroup -S www && adduser www -D -S -s /bin/sh -G www \
&& wget -P /home/soft https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz \
&& wget -P /home/soft http://nginx.org/download/nginx-1.21.1.tar.gz \
&& wget -P /home/soft https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz \
&& cd /home/soft && tar -zxf nginx-1.21.1.tar.gz && tar -zxf v0.1.18.tar.gz && tar -zxf pcre-8.44.tar.gz \
&& cd /home/soft/nginx-1.21.1 \
&& ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-stream --with-http_sub_module --with-pcre=/home/soft/pcre-8.44 --add-module=/home/soft/nginx-module-vts-0.1.18 \
&& make && make install \
# Omit irrelevant code
【问题讨论】:
-
您能否包含足够多的无关代码,以便我们重现您的错误?
-
查看 Makefile 的相关摘录也会很有帮助。 (您可以使用 Docker Hub
nginx映像而不是自己构建吗?)