set ld-musl-path (#8736)

This commit is contained in:
Long Wu Yuan 2022-06-24 11:01:20 +05:30 committed by GitHub
parent 0f30cb04e4
commit 55e93464db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -31,8 +31,6 @@ LABEL org.opencontainers.image.revision="${COMMIT_SHA}"
LABEL build_id="${BUILD_ID}" LABEL build_id="${BUILD_ID}"
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/modules_mount/etc/nginx/modules/modules
WORKDIR /etc/nginx WORKDIR /etc/nginx
RUN apk update \ RUN apk update \
@ -61,7 +59,12 @@ RUN bash -xeu -c ' \
for dir in "${writeDirs[@]}"; do \ for dir in "${writeDirs[@]}"; do \
mkdir -p ${dir}; \ mkdir -p ${dir}; \
chown -R www-data.www-data ${dir}; \ chown -R www-data.www-data ${dir}; \
done' done' \
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
# Could get complicated arch specific paths become a need
&& echo "/lib:/usr/lib:/usr/local/lib:/modules_mount/otel/lib" > /etc/ld-musl-x86_64.path
RUN apk add --no-cache libcap \ RUN apk add --no-cache libcap \
&& setcap cap_net_bind_service=+ep /nginx-ingress-controller \ && setcap cap_net_bind_service=+ep /nginx-ingress-controller \

View file

@ -44,7 +44,6 @@ LABEL build_id="${BUILD_ID}"
ENV LUA_PATH="/usr/local/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/lib/lua/?.lua;;" ENV LUA_PATH="/usr/local/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/lib/lua/?.lua;;"
ENV LUA_CPATH="/usr/local/lib/lua/?/?.so;/usr/local/lib/lua/?.so;;" ENV LUA_CPATH="/usr/local/lib/lua/?/?.so;/usr/local/lib/lua/?.so;;"
ENV PATH=$PATH:/usr/local/luajit/bin:/usr/local/nginx/sbin:/usr/local/nginx/bin ENV PATH=$PATH:/usr/local/luajit/bin:/usr/local/nginx/sbin:/usr/local/nginx/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/modules_mount/etc/nginx/modules/modules
RUN apk update \ RUN apk update \
&& apk upgrade \ && apk upgrade \
@ -81,7 +80,11 @@ RUN bash -xeu -c ' \
for dir in "${writeDirs[@]}"; do \ for dir in "${writeDirs[@]}"; do \
mkdir -p ${dir}; \ mkdir -p ${dir}; \
chown -R www-data.www-data ${dir}; \ chown -R www-data.www-data ${dir}; \
done' done' \
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
# Could get complicated arch specific paths become a need
&& echo "/lib:/usr/lib:/usr/local/lib:/modules_mount/otel/lib" > /etc/ld-musl-x86_64.path
RUN apk add --no-cache libcap \ RUN apk add --no-cache libcap \
&& setcap cap_sys_chroot,cap_net_bind_service=+ep /nginx-ingress-controller \ && setcap cap_sys_chroot,cap_net_bind_service=+ep /nginx-ingress-controller \