本脚本用于构建包含特定模块的 Nginx,并生成 RPM 和 DEB 包。此脚本为自用定制版本,非通用脚本,使用时需根据实际情况调整。
rpm make脚本目录中。若不使用此模块,可自行注释相关代码。/root/目录中构建。脚本默认配置为构建后的依赖地址,若不使用,可自行注释相关代码。Dockerfile.debian:用于构建 Debian 基础镜像的构建环境镜像。docker build --build-arg BASE_IMAGE=debian:12 -f Dockerfile.debian -t Ngxin-deb-debian12/v3.
debian:11, debian:12, debian:latest, ubuntu:22.04, ubuntu:latest(24.04)已测试通过。若要使用其他基础镜像,可在BASE_IMAGE=debian:11此处定义调用镜像,例如:
docker build --build-arg BASE_IMAGE=debian:11 -f Dockerfile.debian -t Ngxin-deb-debian11/v3.
pkg-oss:latest-debian12-amd64,pkg-oss:latest-debian11-amd64docker pull ghcr.io/wy414012/pkg-oss:latest-debian12-amd64
git clone https://github.com/wy414012/pkg-oss.git cd pkg-oss docker run --rm -v $(pwd):/host/pkg-oss pkg-oss:latest-debian12-amd64 或 docker run --rm -v $(pwd):/host/pkg-oss pkg-oss:latest-debian12-amd64
build_all.sh:用于构建出 deb 包的脚本,在容器启动时默认执行。docker run --rm -v $(pwd):/host/pkg-oss pkg-oss:latest-debian12-amd64
docker run --rm -v $(pwd):/host/pkg-oss -e http_proxy=http://ip:port -e https_proxy=http://ip:port pkg-oss:latest-debian12-amd64
由于可能存在访问docker不方便的情况,所以环境镜像不支持直接调用,只能自行构建。若有权限,可以构建后 push 到docker.io。构建出来的环境镜像大小约为 1.6GB。
默认使用boringssl构建 QUIC 支持,并添加了目录访问美化模块。请根据自己的网络环境和需求进行调整。
目录美化模块ngx-fancyindex,请在该仓库克隆,也可以自行使用其它版本的目录美化模块。
构建出的deb包在当前目录下的pkg-output中
This is the Git repo of the official packages for NGINX Open Source. It is used as a source of truth to build binary packages for all supported Linux distributions and their variants.
The changelog for NGINX releases is available at nginx.org changes page.
Please see the contributing guide for guidelines on how to best contribute to this project.
© F5, Inc. 2025