Closed labdiynez closed 4 weeks ago
Hi @labdiynez - it looks like the nginx:1.26.2-alpine3.20-slim
image lacks curl
so cant fetch the sources.
You might want to try nginx:1.26.2-alpine3.20
instead or a following patch to Dockerfile.alpine:
diff --git a/modules/Dockerfile.alpine b/modules/Dockerfile.alpine
index 4b6b091..f6d39c0 100644
--- a/modules/Dockerfile.alpine
+++ b/modules/Dockerfile.alpine
@@ -15,7 +15,7 @@ COPY ./ /modules/
RUN apk update \
&& apk add linux-headers openssl-dev pcre2-dev zlib-dev openssl abuild \
musl-dev libxslt libxml2-utils make mercurial gcc unzip git \
- xz g++ coreutils \
+ xz g++ coreutils curl \
# allow abuild as a root user \
&& printf "#!/bin/sh\\nSETFATTR=true /usr/bin/abuild -F \"\$@\"\\n" > /usr/local/bin/abuild \
&& chmod +x /usr/local/bin/abuild \
Hi @labdiynez - it looks like the
nginx:1.26.2-alpine3.20-slim
image lackscurl
so cant fetch the sources.You might want to try
nginx:1.26.2-alpine3.20
instead or a following patch to Dockerfile.alpine:diff --git a/modules/Dockerfile.alpine b/modules/Dockerfile.alpine index 4b6b091..f6d39c0 100644 --- a/modules/Dockerfile.alpine +++ b/modules/Dockerfile.alpine @@ -15,7 +15,7 @@ COPY ./ /modules/ RUN apk update \ && apk add linux-headers openssl-dev pcre2-dev zlib-dev openssl abuild \ musl-dev libxslt libxml2-utils make mercurial gcc unzip git \ - xz g++ coreutils \ + xz g++ coreutils curl \ # allow abuild as a root user \ && printf "#!/bin/sh\\nSETFATTR=true /usr/bin/abuild -F \"\$@\"\\n" > /usr/local/bin/abuild \ && chmod +x /usr/local/bin/abuild \
Thank you it works.
` => CACHED [builder 2/4] RUN if [ "brotli geoip2 headers-more image-filter njs perl set-misc subs-filter xslt" = "" ]; then echo "No additional modules enabled, exiting"; exit 1; fi 0.0s => [builder 3/4] COPY ./ /modules/ 0.0s => [builder 4/4] RUN apk update && apk add linux-headers openssl-dev pcre2-dev zlib-dev openssl abuild musl-dev libxslt libxml2-utils make mercurial gcc unzip git xz g++ coreutils && printf "#!/bin/sh\nSETFATTR=true /usr/ 18.2s => ERROR [stage-1 2/2] RUN --mount=type=bind,target=/tmp/packages/,source=/tmp/packages/,from=builder . /tmp/packages/modules.env && for module in $BUILT_MODULES; do apk add --no-cache --allow-untrusted /tmp/packages/nginx-module-${module}-1 4.4s
1 warning found (use docker --debug to expand):
FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 2) Dockerfile.alpine:65
64 | FROM ${NGINX_FROM_IMAGE} 65 | >>> RUN --mount=type=bind,target=/tmp/packages/,source=/tmp/packages/,from=builder \ 66 | >>> . /tmp/packages/modules.env \ 67 | >>> && for module in $BUILT_MODULES; do \ 68 | >>> apk add --no-cache --allow-untrusted /tmp/packages/nginx-module-${module}-${NGINX_VERSION}*.apk; \ 69 | >>> done 70 |
ERROR: failed to solve: process "/bin/sh -c . /tmp/packages/modules.env && for module in $BUILT_MODULES; do apk add --no-cache --allow-untrusted /tmp/packages/nginx-module-${module}-${NGINX_VERSION}*.apk; done" did not complete successfully: exit code: 99`
docker build --build-arg ENABLED_MODULES="brotli geoip2 headers-more image-filter njs perl set-misc subs-filter xslt" --build-arg NGINX_FROM_IMAGE="nginx:1.26.2-alpine3.20-slim" -t test/nginx:1.26.2 . -f Dockerfile.alpine