added otel module to nginx
CI / Build nginx docker images (push) Failing after 8m27s

This commit is contained in:
2026-08-05 09:34:58 +08:00
parent ecf2d67aad
commit 82c2cb2c12
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -10,9 +10,11 @@ RUN --mount=type=cache,target=/var/cache/apk apk add \
bind-tools \
binutils \
build-base \
c-ares-dev \
ca-certificates \
cmake \
gcc \
g++ \
gd-dev \
geoip-dev \
git \
@@ -82,6 +84,15 @@ WORKDIR /home/luser
ADD --chown=luser:luser --chmod=755 ./build-rtmp.sh ./build-rtmp.sh
RUN ./build-rtmp.sh
FROM build AS build-otel
ADD --chown=luser:luser https://github.com/nginx/nginx-otel.git#v0.1.2 /nginx-otel
USER luser
RUN cmake -G Ninja -B /home/luser/otel-build -S /nginx-otel \
-DNGX_OTEL_NGINX_BUILD_DIR=/nginx/objs \
-DCMAKE_BUILD_TYPE=Release \
&& cmake --build /home/luser/otel-build
FROM base AS release
ARG VERSION
ENV NGINX_VERSION=${VERSION}
@@ -99,6 +110,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
(cd nginx && sh /install.sh)
RUN --mount=type=cache,target=/var/cache/apk apk del .install_deps
COPY --from=build-rtmp --chown=root:root /nginx/objs/ngx_rtmp_module.so /usr/lib/nginx/modules/
COPY --from=build-otel --chown=root:root /home/luser/otel-build/ngx_otel_module.so /usr/lib/nginx/modules/
COPY --from=build /home/luser/libressl/openssl.cnf /etc/ssl/openssl.cnf
COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY conf/dhparam /etc/nginx/dhparam
+1 -1
View File
@@ -17,7 +17,7 @@ strip -s /usr/lib/nginx/modules/*.so
apk add --no-cache --virtual .gettext gettext
mv /usr/bin/envsubst /tmp/
runDeps="libintl libxml2 musl zlib tzdata ca-certificates pcre brotli-libs libxslt geoip"
runDeps="libintl libxml2 musl zlib tzdata ca-certificates pcre brotli-libs libxslt geoip libstdc++ c-ares"
apk add --no-cache $runDeps
apk del .gettext
mv /tmp/envsubst /usr/local/bin/