Implemented Bionic/libc compatibility.

This commit is contained in:
2026-05-12 19:12:02 +03:30
parent d8dfe1559d
commit f97ac2f7c5
10 changed files with 140 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
ARG DEBIAN_VERSION=bookworm
ARG BASE_IMAGE=debian:bookworm-slim
ARG NGINX_VERSION=1.28.0
FROM debian:${DEBIAN_VERSION}-slim AS builder
FROM ${BASE_IMAGE} AS builder
ARG NGINX_VERSION
ARG NGINX_CONFIGURE_ARGS="--with-compat --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_v2_module --with-http_gzip_static_module"
@@ -48,9 +48,10 @@ RUN ./configure \
&& cp objs/ngx_http_monitoring_module.so /usr/local/nginx/modules/
FROM debian:${DEBIAN_VERSION}-slim AS runtime
FROM ${BASE_IMAGE} AS runtime
ARG NGINX_VERSION
ARG OPENSSL_RUNTIME_PACKAGE=libssl3
LABEL org.opencontainers.image.title="ngx_http_monitoring_module nginx image" \
org.opencontainers.image.description="Nginx built with ngx_http_monitoring_module and embedded monitoring dashboard" \
@@ -60,7 +61,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
libpcre2-8-0 \
libssl3 \
${OPENSSL_RUNTIME_PACKAGE} \
zlib1g \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system --gid 101 nginx \

View File

@@ -22,6 +22,12 @@ To choose a different Nginx version:
NGINX_VERSION=1.28.0 sh dockerized/build.sh
```
To build the image on an Ubuntu Bionic 18.04 libc baseline:
```sh
BASE_IMAGE=ubuntu:18.04 OPENSSL_RUNTIME_PACKAGE=libssl1.1 sh dockerized/build.sh
```
## Run
```sh

View File

@@ -3,11 +3,15 @@ set -eu
IMAGE="${IMAGE:-ngx-http-monitoring-module:local}"
NGINX_VERSION="${NGINX_VERSION:-1.28.0}"
BASE_IMAGE="${BASE_IMAGE:-debian:bookworm-slim}"
OPENSSL_RUNTIME_PACKAGE="${OPENSSL_RUNTIME_PACKAGE:-libssl3}"
cd "$(dirname "$0")/.."
docker build \
--build-arg "NGINX_VERSION=$NGINX_VERSION" \
--build-arg "BASE_IMAGE=$BASE_IMAGE" \
--build-arg "OPENSSL_RUNTIME_PACKAGE=$OPENSSL_RUNTIME_PACKAGE" \
-f dockerized/Dockerfile \
-t "$IMAGE" \
.

View File

@@ -4,7 +4,9 @@ services:
context: ..
dockerfile: dockerized/Dockerfile
args:
BASE_IMAGE: "debian:bookworm-slim"
NGINX_VERSION: "1.28.0"
OPENSSL_RUNTIME_PACKAGE: "libssl3"
image: ngx-http-monitoring-module:local
container_name: ngx-http-monitoring-module
ports: