This commit is contained in:
+18
-1
@@ -10,9 +10,11 @@ RUN --mount=type=cache,target=/var/cache/apk apk add \
|
|||||||
bind-tools \
|
bind-tools \
|
||||||
binutils \
|
binutils \
|
||||||
build-base \
|
build-base \
|
||||||
|
c-ares-dev \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
cmake \
|
cmake \
|
||||||
gcc \
|
gcc \
|
||||||
|
g++ \
|
||||||
gd-dev \
|
gd-dev \
|
||||||
geoip-dev \
|
geoip-dev \
|
||||||
git \
|
git \
|
||||||
@@ -47,12 +49,14 @@ RUN mkdir -p libressl/build
|
|||||||
RUN cmake -G Ninja -B libressl/build -S libressl \
|
RUN cmake -G Ninja -B libressl/build -S libressl \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DLIBRESSL_APPS=OFF \
|
-DLIBRESSL_APPS=OFF \
|
||||||
-DLIBRESSL_SKIP_INSTALL=ON \
|
-DLIBRESSL_SKIP_INSTALL=OFF \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/home/luser/.local \
|
||||||
-DENABLE_ASM=OFF \
|
-DENABLE_ASM=OFF \
|
||||||
-DENABLE_NC=OFF \
|
-DENABLE_NC=OFF \
|
||||||
-DLIBRESSL_TESTS=OFF \
|
-DLIBRESSL_TESTS=OFF \
|
||||||
-DBUILD_SHARED_LIBS=OFF
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
RUN cmake --build libressl/build
|
RUN cmake --build libressl/build
|
||||||
|
RUN cmake --install libressl/build
|
||||||
|
|
||||||
FROM build_stage_1 AS build_stage_2_vanilla
|
FROM build_stage_1 AS build_stage_2_vanilla
|
||||||
ARG NGINX_VERSION
|
ARG NGINX_VERSION
|
||||||
@@ -82,6 +86,18 @@ WORKDIR /home/luser
|
|||||||
ADD --chown=luser:luser --chmod=755 ./build-rtmp.sh ./build-rtmp.sh
|
ADD --chown=luser:luser --chmod=755 ./build-rtmp.sh ./build-rtmp.sh
|
||||||
RUN ./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 \
|
||||||
|
-DOPENSSL_ROOT_DIR=/home/luser/.local \
|
||||||
|
-DNGX_OTEL_SDK=6f65c3eded2bb4656c8d675cad43bbe694c531c7 \
|
||||||
|
-DNGX_OTEL_GRPC=c876f4da50f7da2f331888b88b2a7243514139fe \
|
||||||
|
&& cmake --build /home/luser/otel-build
|
||||||
|
|
||||||
|
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ENV NGINX_VERSION=${VERSION}
|
ENV NGINX_VERSION=${VERSION}
|
||||||
@@ -99,6 +115,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
|
|||||||
(cd nginx && sh /install.sh)
|
(cd nginx && sh /install.sh)
|
||||||
RUN --mount=type=cache,target=/var/cache/apk apk del .install_deps
|
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-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 --from=build /home/luser/libressl/openssl.cnf /etc/ssl/openssl.cnf
|
||||||
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY conf/dhparam /etc/nginx/dhparam
|
COPY conf/dhparam /etc/nginx/dhparam
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ strip -s /usr/lib/nginx/modules/*.so
|
|||||||
|
|
||||||
apk add --no-cache --virtual .gettext gettext
|
apk add --no-cache --virtual .gettext gettext
|
||||||
mv /usr/bin/envsubst /tmp/
|
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 add --no-cache $runDeps
|
||||||
apk del .gettext
|
apk del .gettext
|
||||||
mv /tmp/envsubst /usr/local/bin/
|
mv /tmp/envsubst /usr/local/bin/
|
||||||
|
|||||||
Reference in New Issue
Block a user