docker-nginx-http3
docker-nginx-http3 copied to clipboard
Build fails with error
make[1]: Leaving directory '/usr/src/nginx-1.21.0' make: *** [Makefile:10: build] Error 2 The command '/bin/sh -c set -x; GPG_KEYS=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && CONFIG=" --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-pcre=/usr/src/pcre-${PCRE_VERSION} --with-pcre-jit --with-zlib=/usr/src/zlib-${ZLIB_VERSION} --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --with-openssl=/usr/src/boringssl --add-module=/usr/src/ngx_brotli --add-module=/usr/src/headers-more-nginx-module --add-module=/usr/src/njs/nginx --add-module=/usr/src/nginx_cookie_flag_module --with-cc-opt=-Wno-error " && addgroup -S nginx && adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx && apk update && apk upgrade && apk add --no-cache ca-certificates && update-ca-certificates && apk add --no-cache --virtual .build-deps curl gcc gd-dev geoip-dev gnupg libc-dev libxslt-dev linux-headers make openssl-dev pcre-dev perl-dev zlib-dev && apk add --no-cache --virtual .brotli-build-deps autoconf automake cmake g++ git go libtool mercurial patch perl && mkdir -p /usr/src && cd /usr/src && git clone --depth=1 --recursive --shallow-submodules https://github.com/google/ngx_brotli && cd ngx_brotli && git checkout -b $NGX_BROTLI_COMMIT && cd .. && wget -qO- https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.tar.gz | tar zxvf - && cd pcre-${PCRE_VERSION} && ./configure && make && make install && cd .. && wget -qO- http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz | tar zxvf - && cd zlib-${ZLIB_VERSION} && ./configure && make && make install && cd .. && git clone --depth=1 --recursive https://github.com/google/boringssl && cd boringssl && mkdir build && cd build && cmake .. && make && cd ../.. && git clone --depth=1 --recursive https://github.com/openresty/headers-more-nginx-module && git clone --depth=1 --recursive https://github.com/nginx/njs && git clone --depth=1 --recursive https://github.com/AirisX/nginx_cookie_flag_module && mkdir -p /usr/src && cd /usr/src && hg clone -b quic https://hg.nginx.org/nginx-quic && mv nginx-quic nginx-${NGINX_VERSION} && cd nginx-${NGINX_VERSION} && NGINX_QUIC_REVISION=$(hg id -i) && ./auto/configure $CONFIG --with-debug --with-http_v3_module --with-http_quic_module --with-stream_quic_module --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" --build="pcre-${PCRE_VERSION} zlib-${ZLIB_VERSION} boringssl-$(git --git-dir=/usr/src/boringssl/.git rev-parse --short HEAD) nginx-quic-${NGINX_QUIC_REVISION} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) headers-more-nginx-module-$(git --git-dir=/usr/src/headers-more-nginx-module/.git rev-parse --short HEAD) njs-$(git --git-dir=/usr/src/njs/.git rev-parse --short HEAD) nginx_cookie_flag_module-$(git --git-dir=/usr/src/nginx_cookie_flag_module/.git rev-parse --short HEAD)" && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so && mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./auto/configure $CONFIG --with-http_v3_module --with-http_quic_module --with-stream_quic_module --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" --build="pcre-${PCRE_VERSION} zlib-${ZLIB_VERSION} boringssl-$(git --git-dir=/usr/src/boringssl/.git rev-parse --short HEAD) nginx-quic-${NGINX_QUIC_REVISION} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) headers-more-nginx-module-$(git --git-dir=/usr/src/headers-more-nginx-module/.git rev-parse --short HEAD) njs-$(git --git-dir=/usr/src/njs/.git rev-parse --short HEAD) nginx_cookie_flag_module-$(git --git-dir=/usr/src/nginx_cookie_flag_module/.git rev-parse --short HEAD)" && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so && install -m755 objs/ngx_http_perl_module-debug.so /usr/lib/nginx/modules/ngx_http_perl_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && rm -rf /usr/src/nginx-$NGINX_VERSION && rm -rf /usr/src/ngx_brotli && rm -rf /usr/src/headers-more-nginx-module && rm -rf /usr/src/njs && rm -rf /usr/src/nginx_cookie_flag_module && rm -rf /usr/src/boringssl && rm -rf /usr/src/nginx-quic && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .brotli-build-deps && apk del .gettext && mv /tmp/envsubst /usr/local/bin/' returned a non-zero code: 2
Same error
Can you try with the latest Dockerfile? The GitHub actions are working to build the image. A new image was pushed yesterday.
Errors out again:
xecuting busybox-1.33.1-r4.trigger Continuing the upgrade transaction with new apk-tools: (1/3) Upgrading musl (1.2.2-r5 -> 1.2.2-r6) 482B25B74E7F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882: (2/3) Upgrading busybox (1.33.1-r4 -> 1.34.0-r2) ERROR: musl-1.2.2-r6: Permission denied 482B25B74E7F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882: (3/3) Upgrading musl-utils (1.2.2-r5 -> 1.2.2-r6) ERROR: busybox-1.34.0-r2: Permission denied 482B25B74E7F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882: ERROR: musl-utils-1.2.2-r6: Permission denied 3 errors; 7 MiB in 11 packages Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from ha.pool.sks-keyservers.net
- echo 'Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from ha.pool.sks-keyservers.net'
- gpg --keyserver ha.pool.sks-keyservers.net --keyserver-options 'timeout=10' --recv-keys B0F4253373F8F6F510D42178520A9993A1C052F8 /bin/sh: gpg: not found Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from hkp://keyserver.ubuntu.com:80
- echo 'Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from hkp://keyserver.ubuntu.com:80'
- gpg --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options 'timeout=10' --recv-keys B0F4253373F8F6F510D42178520A9993A1C052F8 /bin/sh: gpg: not found
- echo 'Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from hkp://p80.pool.sks-keyservers.net:80' Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from hkp://p80.pool.sks-keyservers.net:80
- gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --keyserver-options 'timeout=10' --recv-keys B0F4253373F8F6F510D42178520A9993A1C052F8 /bin/sh: gpg: not found
- echo 'Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from pgp.mit.edu' Fetching GPG key B0F4253373F8F6F510D42178520A9993A1C052F8 from pgp.mit.edu
- gpg --keyserver pgp.mit.edu --keyserver-options 'timeout=10' --recv-keys B0F4253373F8F6F510D42178520A9993A1C052F8 /bin/sh: gpg: not found
- test -z
- echo 'error: failed to fetch GPG key B0F4253373F8F6F510D42178520A9993A1C052F8' error: failed to fetch GPG key B0F4253373F8F6F510D42178520A9993A1C052F8
- exit 1 The command '/bin/sh -c set -x; GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 && CONFIG=" --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-pcre=/usr/src/pcre-${PCRE_VERSION} --with-pcre-jit --with-zlib=/usr/src/zlib-${ZLIB_VERSION} --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --with-http_v3_module --with-openssl=/usr/src/quiche/deps/boringssl --with-quiche=/usr/src/quiche --add-module=/usr/src/ngx_brotli --add-module=/usr/src/headers-more-nginx-module --add-module=/usr/src/njs/nginx --add-module=/usr/src/nginx_cookie_flag_module --with-cc-opt=-Wno-error " && addgroup -S nginx && adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx && apk update && apk upgrade && apk add --no-cache ca-certificates && update-ca-certificates && apk add --no-cache --virtual .build-deps gcc libc-dev make openssl-dev pcre-dev zlib-dev linux-headers curl gnupg libxslt-dev gd-dev geoip-dev perl-dev && apk add --no-cache --virtual .brotli-build-deps autoconf libtool automake git g++ cmake go perl rust cargo patch && mkdir -p /usr/src && cd /usr/src && git clone --depth=1 --recursive --shallow-submodules https://github.com/google/ngx_brotli && cd ngx_brotli && git checkout -b $NGX_BROTLI_COMMIT && cd .. && wget -qO- https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.tar.gz | tar zxvf - && cd pcre-${PCRE_VERSION} && ./configure && make && make install && cd .. && wget -qO- http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz | tar zxvf - && cd zlib-${ZLIB_VERSION} && ./configure && make && make install && cd .. && git clone --depth=1 --recursive https://github.com/openresty/headers-more-nginx-module && git clone --depth=1 --recursive https://github.com/nginx/njs && git clone --depth=1 --recursive https://github.com/AirisX/nginx_cookie_flag_module && git clone --depth=1 --recursive https://github.com/cloudflare/quiche && cd quiche && git checkout -b $QUICHE_COMMIT && cd .. && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc && export GNUPGHOME="$(mktemp -d)" && found=''; for server in ha.pool.sks-keyservers.net hkp://keyserver.ubuntu.com:80 hkp://p80.pool.sks-keyservers.net:80 pgp.mit.edu ; do echo "Fetching GPG key $GPG_KEYS from $server"; gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$GPG_KEYS" && found=yes && break; done; test -z "$found" && echo >&2 "error: failed to fetch GPG key $GPG_KEYS" && exit 1; gpg --batch --verify nginx.tar.gz.asc nginx.tar.gz && rm -rf "$GNUPGHOME" nginx.tar.gz.asc && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /usr/src/nginx-$NGINX_VERSION && patch -p01 < /usr/src/quiche/extras/nginx/nginx-1.16.patch && ./configure $CONFIG --with-debug --build="pcre-${PCRE_VERSION} zlib-${ZLIB_VERSION} quiche-$(git --git-dir=/usr/src/quiche/.git rev-parse --short HEAD) ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) headers-more-nginx-module-$(git --git-dir=/usr/src/headers-more-nginx-module/.git rev-parse --short HEAD) njs-$(git --git-dir=/usr/src/njs/.git rev-parse --short HEAD) nginx_cookie_flag_module-$(git --git-dir=/usr/src/nginx_cookie_flag_module/.git rev-parse --short HEAD)" && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so && mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG --build="pcre-${PCRE_VERSION} zlib-${ZLIB_VERSION} quiche-$(git --git-dir=/usr/src/quiche/.git rev-parse --short HEAD) ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) headers-more-nginx-module-$(git --git-dir=/usr/src/headers-more-nginx-module/.git rev-parse --short HEAD) njs-$(git --git-dir=/usr/src/njs/.git rev-parse --short HEAD) nginx_cookie_flag_module-$(git --git-dir=/usr/src/nginx_cookie_flag_module/.git rev-parse --short HEAD)" && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so && install -m755 objs/ngx_http_perl_module-debug.so /usr/lib/nginx/modules/ngx_http_perl_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && rm -rf /usr/src/nginx-$NGINX_VERSION && rm -rf /usr/src/ngx_brotli && rm -rf /usr/src/headers-more-nginx-module && rm -rf /usr/src/njs && rm -rf /usr/src/nginx_cookie_flag_module && rm -rf /usr/src/quiche && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .brotli-build-deps && apk del .gettext && mv /tmp/envsubst /usr/local/bin/' returned a non-zero code: 1
I'm not exactly sure why your build is failing. The builds in the GitHub actions are working. Why are you encountering these issues?

That is not normal generally speaking.
I try to build the Dockerfile on this site without any modifications. I have no idea why it is failing.
@gurumark turn off apk upgrade.
@xudaolong I use the Dockerfile on this repository. Do you suggest modifying the file? Is there any other way to disabling apk upgrade in the docker build?