Skip to content

Commit 257eea4

Browse files
committed
Update NGINX new-tag
1 parent 0e3021d commit 257eea4

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

build/Dockerfile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,23 @@ ARG RESTY_LRU_VER=0.13
5454
ENV LUA_PATH="/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;./?.lua;;"
5555
ENV LUA_CPATH="/usr/local/lib/lua/5.1/?.so;./?.so;;"
5656

57-
RUN set -euo pipefail; \
58-
mkdir -p /usr/local/share/lua/5.1 /usr/local/lib/lua/5.1; \
59-
curl -fL -o /tmp/lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/refs/tags/v${RESTY_CORE_VER}.tar.gz; \
60-
tar -xzf /tmp/lua-resty-core.tar.gz -C /tmp; \
61-
cp -R /tmp/lua-resty-core-*/lib/resty /usr/local/share/lua/5.1/; \
62-
curl -fL -o /tmp/lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/refs/tags/v${RESTY_LRU_VER}.tar.gz; \
63-
tar -xzf /tmp/lua-resty-lrucache.tar.gz -C /tmp; \
64-
cp -R /tmp/lua-resty-lrucache-*/lib/resty /usr/local/share/lua/5.1/; \
65-
rm -rf /tmp/lua-resty-*
57+
RUN set -eux; \
58+
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*; \
59+
mkdir -p /usr/local/share/lua/5.1/resty; \
60+
tmp="$(mktemp -d)"; \
61+
# ---- resty-core ----
62+
curl -fL -o "$tmp/core.tgz" "https://github.com/openresty/lua-resty-core/archive/refs/tags/v${RESTY_CORE_VER}.tar.gz"; \
63+
mkdir -p "$tmp/core"; tar -xzf "$tmp/core.tgz" --strip-components=1 -C "$tmp/core"; \
64+
test -d "$tmp/core/lib/resty"; \
65+
cp -R "$tmp/core/lib/resty/"* /usr/local/share/lua/5.1/resty/; \
66+
# ---- resty-lrucache ----
67+
curl -fL -o "$tmp/lru.tgz" "https://github.com/openresty/lua-resty-lrucache/archive/refs/tags/v${RESTY_LRU_VER}.tar.gz"; \
68+
mkdir -p "$tmp/lru"; tar -xzf "$tmp/lru.tgz" --strip-components=1 -C "$tmp/lru"; \
69+
test -d "$tmp/lru/lib/resty"; \
70+
cp -R "$tmp/lru/lib/resty/"* /usr/local/share/lua/5.1/resty/; \
71+
# perms + cleanup
72+
find /usr/local/share/lua/5.1 -type f -name '*.lua' -exec chmod 0644 {} \;; \
73+
rm -rf "$tmp"
6674

6775
ADD https://github.com/airslate-ops/nginx-ingress-controller/releases/download/${VTS_VERSION}/ngx_http_vhost_traffic_status_module.so ${MODULES_DIR}/
6876
ADD https://github.com/airslate-ops/nginx-ingress-controller/releases/download/${OTEL_VERSION}/ngx_otel_module.so ${MODULES_DIR}/

0 commit comments

Comments
 (0)