mirror of
https://github.com/aarmea/fahrengit-451.git
synced 2026-03-22 08:58:15 +00:00
Fix nginx build
This commit is contained in:
parent
c515981236
commit
e7036d99a8
1 changed files with 12 additions and 6 deletions
|
|
@ -29,11 +29,17 @@ RUN wget -q "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" \
|
||||||
|
|
||||||
WORKDIR /usr/src/nginx-${NGINX_VERSION}
|
WORKDIR /usr/src/nginx-${NGINX_VERSION}
|
||||||
|
|
||||||
# Build only the dynamic module (configure flags from `nginx -V`)
|
# Build only the dynamic module.
|
||||||
RUN eval $(nginx -V 2>&1 | grep 'configure arguments:' | sed 's/configure arguments://') && \
|
# nginx -V prints configure arguments to stderr; we capture them into a file
|
||||||
./configure \
|
# and pass them to ./configure via xargs so the shell never tries to execute
|
||||||
$configure_args \
|
# them as a command (which is what breaks the eval approach).
|
||||||
--add-dynamic-module=/usr/src/ngx_http_geoip2_module \
|
RUN nginx -V 2>&1 \
|
||||||
|
| grep 'configure arguments:' \
|
||||||
|
| sed 's/configure arguments://' \
|
||||||
|
| sed 's/ --add-dynamic-module[^ ]*//g' \
|
||||||
|
> /tmp/nginx_configure_args.txt \
|
||||||
|
&& echo "--add-dynamic-module=/usr/src/ngx_http_geoip2_module" >> /tmp/nginx_configure_args.txt \
|
||||||
|
&& xargs -a /tmp/nginx_configure_args.txt ./configure \
|
||||||
&& make modules
|
&& make modules
|
||||||
|
|
||||||
# ── Runtime image ─────────────────────────────────────────────────────────────
|
# ── Runtime image ─────────────────────────────────────────────────────────────
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue