Skip to content

Commit 7d5a18f

Browse files
committed
refactor: fallback to ngx_brotli 6r975bc and optimize git clone command
1 parent adc3c4f commit 7d5a18f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

focal/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG}
88

99
LABEL maintainer="spedon <[email protected]>"
1010

11-
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
11+
ENV NGX_BROTLI_COMMIT="6e975bcb015f62e1f303054897783355e2a877dc" \
12+
PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
1213

1314
# Docker Build Arguments
1415
ARG RESTY_IMAGE_BASE="ubuntu"
@@ -157,8 +158,11 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
157158
&& echo 'fetching libbrotli' \
158159
&& cd /usr/src \
159160
&& echo 'fetching ngx_brotli' \
160-
&& git clone --recurse-submodules https://github.com/google/ngx_brotli.git \
161-
&& cd ngx_brotli/deps/brotli \
161+
&& git clone https://github.com/google/ngx_brotli.git \
162+
&& cd ngx_brotli \
163+
&& git checkout -b $NGX_BROTLI_COMMIT \
164+
&& git submodule update --init --recursive \
165+
&& cd deps/brotli \
162166
&& mkdir out \
163167
&& cd out \
164168
&& echo 'building libbrotli' \

0 commit comments

Comments
 (0)