From 71f8c58f7f4fc7f65d4ef5b6f8d30686ad9fd765 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 24 May 2023 16:27:24 +0100 Subject: Updated copyright notice. --- pkg/deb/debian.module/copyright.unit-jsc11 | 11 +++++++---- pkg/deb/debian.module/copyright.unit-jsc8 | 11 +++++++---- pkg/deb/debian/copyright | 11 +++++++---- pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 | 11 +++++++---- pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 | 11 +++++++---- 5 files changed, 35 insertions(+), 20 deletions(-) (limited to 'pkg') diff --git a/pkg/deb/debian.module/copyright.unit-jsc11 b/pkg/deb/debian.module/copyright.unit-jsc11 index b2e4a117..e11b64d3 100644 --- a/pkg/deb/debian.module/copyright.unit-jsc11 +++ b/pkg/deb/debian.module/copyright.unit-jsc11 @@ -1,12 +1,15 @@ NGINX Unit. - Copyright 2017-2022 NGINX, Inc. + Copyright 2017-2023 NGINX, Inc. + Copyright 2017-2023 Andrei Zeliankou + Copyright 2018-2023 Konstantin Pavlov + Copyright 2021-2023 Zhidao Hong + Copyright 2021-2023 Alejandro Colomar + Copyright 2022-2023 Andrew Clayton + Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov - Copyright 2017-2022 Andrei Zeliankou - Copyright 2018-2022 Konstantin Pavlov - Copyright 2021-2022 Zhidao Hong Copyright 2021-2022 Oisín Canty Copyright 2017-2021 Igor Sysoev Copyright 2017-2021 Andrei Belov diff --git a/pkg/deb/debian.module/copyright.unit-jsc8 b/pkg/deb/debian.module/copyright.unit-jsc8 index 1dab9cce..1d267021 100644 --- a/pkg/deb/debian.module/copyright.unit-jsc8 +++ b/pkg/deb/debian.module/copyright.unit-jsc8 @@ -1,12 +1,15 @@ NGINX Unit. - Copyright 2017-2022 NGINX, Inc. + Copyright 2017-2023 NGINX, Inc. + Copyright 2017-2023 Andrei Zeliankou + Copyright 2018-2023 Konstantin Pavlov + Copyright 2021-2023 Zhidao Hong + Copyright 2021-2023 Alejandro Colomar + Copyright 2022-2023 Andrew Clayton + Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov - Copyright 2017-2022 Andrei Zeliankou - Copyright 2018-2022 Konstantin Pavlov - Copyright 2021-2022 Zhidao Hong Copyright 2021-2022 Oisín Canty Copyright 2017-2021 Igor Sysoev Copyright 2017-2021 Andrei Belov diff --git a/pkg/deb/debian/copyright b/pkg/deb/debian/copyright index 487c92c5..692ae2e0 100644 --- a/pkg/deb/debian/copyright +++ b/pkg/deb/debian/copyright @@ -1,12 +1,15 @@ NGINX Unit. - Copyright 2017-2022 NGINX, Inc. + Copyright 2017-2023 NGINX, Inc. + Copyright 2017-2023 Andrei Zeliankou + Copyright 2018-2023 Konstantin Pavlov + Copyright 2021-2023 Zhidao Hong + Copyright 2021-2023 Alejandro Colomar + Copyright 2022-2023 Andrew Clayton + Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov - Copyright 2017-2022 Andrei Zeliankou - Copyright 2018-2022 Konstantin Pavlov - Copyright 2021-2022 Zhidao Hong Copyright 2021-2022 Oisín Canty Copyright 2017-2021 Igor Sysoev Copyright 2017-2021 Andrei Belov diff --git a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 index b08fcc34..4505b5b5 100644 --- a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 +++ b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 @@ -1,12 +1,15 @@ NGINX Unit. - Copyright 2017-2022 NGINX, Inc. + Copyright 2017-2023 NGINX, Inc. + Copyright 2017-2023 Andrei Zeliankou + Copyright 2018-2023 Konstantin Pavlov + Copyright 2021-2023 Zhidao Hong + Copyright 2021-2023 Alejandro Colomar + Copyright 2022-2023 Andrew Clayton + Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov - Copyright 2017-2022 Andrei Zeliankou - Copyright 2018-2022 Konstantin Pavlov - Copyright 2021-2022 Zhidao Hong Copyright 2021-2022 Oisín Canty Copyright 2017-2021 Igor Sysoev Copyright 2017-2021 Andrei Belov diff --git a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 index 5e31863d..59891951 100644 --- a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 +++ b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 @@ -1,12 +1,15 @@ NGINX Unit. - Copyright 2017-2022 NGINX, Inc. + Copyright 2017-2023 NGINX, Inc. + Copyright 2017-2023 Andrei Zeliankou + Copyright 2018-2023 Konstantin Pavlov + Copyright 2021-2023 Zhidao Hong + Copyright 2021-2023 Alejandro Colomar + Copyright 2022-2023 Andrew Clayton + Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov - Copyright 2017-2022 Andrei Zeliankou - Copyright 2018-2022 Konstantin Pavlov - Copyright 2021-2022 Zhidao Hong Copyright 2021-2022 Oisín Canty Copyright 2017-2021 Igor Sysoev Copyright 2017-2021 Andrei Belov -- cgit From a3b9b49cfb091410ca8f3c8d9df24d1fe184f8e0 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 7 Jun 2023 17:39:27 -0700 Subject: Packages: added Debian 12 "bookworm" support. --- pkg/deb/Makefile | 11 +++++++++++ pkg/deb/Makefile.jsc-common | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 09544892..044b7226 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -106,6 +106,17 @@ include Makefile.jsc8 include Makefile.jsc11 endif +# Debian 12 +ifeq ($(CODENAME),bookworm) +include Makefile.php +include Makefile.python311 +include Makefile.go +include Makefile.perl +include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc17 +endif + # Debian 11 ifeq ($(CODENAME),bullseye) include Makefile.php diff --git a/pkg/deb/Makefile.jsc-common b/pkg/deb/Makefile.jsc-common index 2b098025..61af8e6e 100644 --- a/pkg/deb/Makefile.jsc-common +++ b/pkg/deb/Makefile.jsc-common @@ -6,8 +6,10 @@ MODULE_SUMMARY_jsc_common= Java shared packages for NGINX Unit MODULE_VERSION_jsc_common= $(VERSION) MODULE_RELEASE_jsc_common= 1 -ifneq (,$(findstring $(CODENAME),bionic)) +ifeq ($(CODENAME),bionic) JAVA_MINVERSION= 8 +else ifeq ($(CODENAME),bookworm) +JAVA_MINVERSION= 17 else JAVA_MINVERSION= 11 endif -- cgit From eb614f11474e44567cf820d075026eeb758ce725 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 11 Jul 2023 11:40:41 -0700 Subject: contrib: updated njs to 0.8.0. --- pkg/contrib/src/njs/SHA512SUMS | 2 +- pkg/contrib/src/njs/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/contrib/src/njs/SHA512SUMS b/pkg/contrib/src/njs/SHA512SUMS index c94e5638..ad8e180c 100644 --- a/pkg/contrib/src/njs/SHA512SUMS +++ b/pkg/contrib/src/njs/SHA512SUMS @@ -1 +1 @@ -9cac2ced65bbfd712f7797f2bfa3fb20509a7e7bd68e8621d5fad32270f6d20a015d707665222559a72f525618bc91e09986a7bedce28af5f0fec9c20be41452 njs-0.7.12.tar.gz +200f3ae1e1909f0d8086e2fbfbd6b8654e596f3ad2e4cf4d863e201cfcb2f86a419fa9061067cbededf6a8c792c1a5ecf60c3a4c983af044c179bb9fe619eea5 njs-0.8.0.tar.gz diff --git a/pkg/contrib/src/njs/version b/pkg/contrib/src/njs/version index 64999f82..8c9ee6ba 100644 --- a/pkg/contrib/src/njs/version +++ b/pkg/contrib/src/njs/version @@ -1 +1 @@ -NJS_VERSION := 0.7.12 +NJS_VERSION := 0.8.0 -- cgit From 36dceaef638141c1f74818760f3f61a35c7470c9 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: added pkg-config file packaging for rpm-based distros. Debian-based distributions package it automatically. --- pkg/rpm/unit.spec.in | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg') diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index 14a2ea00..b4e7863e 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -222,5 +222,6 @@ BANNER %{_libdir}/libunit.a %{_libdir}/libunit-debug.a %{_includedir}/nxt_*.h +%{_datadir}/pkgconfig/unit.pc %changelog -- cgit From 805f6c24d6c19f9a85cfe1540ba5a5090562bfc1 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: contrib: added wasmtime. --- pkg/contrib/src/wasmtime/Makefile | 30 ++++++++++++++++++++++++++++++ pkg/contrib/src/wasmtime/SHA512SUMS | 1 + pkg/contrib/src/wasmtime/version | 1 + 3 files changed, 32 insertions(+) create mode 100644 pkg/contrib/src/wasmtime/Makefile create mode 100644 pkg/contrib/src/wasmtime/SHA512SUMS create mode 100644 pkg/contrib/src/wasmtime/version (limited to 'pkg') diff --git a/pkg/contrib/src/wasmtime/Makefile b/pkg/contrib/src/wasmtime/Makefile new file mode 100644 index 00000000..11797fee --- /dev/null +++ b/pkg/contrib/src/wasmtime/Makefile @@ -0,0 +1,30 @@ +# wasmtime + +include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version +WASMTIME_URL := https://github.com/bytecodealliance/wasmtime/releases/download/v$(WASMTIME_VERSION)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz + +PKGS += wasmtime + +ifeq ($(shell which cargo >/dev/null 2>&1 || echo FAIL),) +CARGO = cargo +else +CARGO = $(error Cargo (Rust package manager) not found) +endif + +ifeq ($(shell uname -s),Linux) +WASMTIME_ARGS=-Clink-arg=-Wl,-soname,libwasmtime.so +endif + +$(TARBALLS)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz: + $(call download_pkg,$(WASMTIME_URL),wasmtime) + +.sum-wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz + +wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz .sum-wasmtime + $(UNPACK) + $(MOVE) + +.wasmtime: wasmtime + cd $< && $(CARGO) rustc --release -p wasmtime-c-api -- $(WASMTIME_ARGS) + cp $ Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: added wasm module packaging for rpm-based distros. --- pkg/rpm/Makefile | 8 +++++++ pkg/rpm/Makefile.wasm | 51 +++++++++++++++++++++++++++++++++++++++++++++ pkg/rpm/unit.module.spec.in | 1 + 3 files changed, 60 insertions(+) create mode 100644 pkg/rpm/Makefile.wasm (limited to 'pkg') diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index d3cc34bd..0573bd4c 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -64,6 +64,7 @@ include Makefile.perl include Makefile.jsc-common include Makefile.jsc8 include Makefile.jsc11 +include Makefile.wasm endif ifeq ($(OSVER), centos9) @@ -74,6 +75,7 @@ include Makefile.perl include Makefile.jsc-common include Makefile.jsc8 include Makefile.jsc11 +include Makefile.wasm endif ifeq ($(OSVER), amazonlinux2) @@ -84,6 +86,7 @@ include Makefile.go include Makefile.perl include Makefile.jsc-common include Makefile.jsc8 +include Makefile.wasm endif ifeq ($(OSVER), amazonlinux2023) @@ -94,6 +97,7 @@ include Makefile.go include Makefile.perl include Makefile.jsc-common include Makefile.jsc17 +include Makefile.wasm endif ifeq ($(OSVER), fedora) @@ -105,6 +109,7 @@ include Makefile.ruby include Makefile.jsc-common include Makefile.jsc8 include Makefile.jsc11 +include Makefile.wasm endif ifeq ($(OSVER), fedora37) @@ -116,6 +121,7 @@ include Makefile.ruby include Makefile.jsc-common include Makefile.jsc8 include Makefile.jsc11 +include Makefile.wasm endif CONFIGURE_ARGS_COMMON=\ @@ -216,6 +222,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil done ; \ pkgname=$(shell echo $@ | cut -d '/' -f 3 | tr '_' '-' | cut -d '.' -f 1) ; \ definitions=`echo "$$MODULE_DEFINITIONS_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + prebuild=`echo "$$MODULE_PREBUILD_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ preinstall=`echo "$$MODULE_PREINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ postinstall=`echo "$$MODULE_POSTINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ files=`echo "$$MODULE_FILES_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ @@ -234,6 +241,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil -e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \ -e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \ -e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \ + -e "s#%%MODULE_PREBUILD%%#$${prebuild}#g" \ -e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \ -e "s#%%MODULE_POSTINSTALL%%#$${postinstall}#g" \ -e "s#%%MODULE_FILES%%#$${files}#g" \ diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm new file mode 100644 index 00000000..c638071b --- /dev/null +++ b/pkg/rpm/Makefile.wasm @@ -0,0 +1,51 @@ +MODULES+= wasm +MODULE_SUFFIX_wasm= wasm + +MODULE_SUMMARY_wasm= WASM module for NGINX Unit + +MODULE_VERSION_wasm= $(VERSION) +MODULE_RELEASE_wasm= 1 + +MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release +MODULE_MAKEARGS_wasm= wasm +MODULE_INSTARGS_wasm= wasm-install + +MODULE_SOURCES_wasm= + +BUILD_DEPENDS_wasm= + +BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) + +define MODULE_PREBUILD_wasm +%{__make} -C pkg/contrib .wasmtime +endef +export MODULE_PREBUILD_wasm + +define MODULE_PREINSTALL_wasm +endef +export MODULE_PREINSTALL_wasm + +define MODULE_POSTINSTALL_wasm +%{__install} -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so %{buildroot}%{_libdir}/ +endef +export MODULE_POSTINSTALL_wasm + +define MODULE_FILES_wasm +%{_libdir}/libwasmtime.so +%{_libdir}/unit/modules/* +%{_libdir}/unit/debug-modules/* +endef +export MODULE_FILES_wasm + +define MODULE_POST_wasm +cat < Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: added wasm module packaging for deb-based distros. --- pkg/deb/Makefile | 9 ++++++++ pkg/deb/Makefile.wasm | 47 ++++++++++++++++++++++++++++++++++++++++++ pkg/deb/debian.module/rules.in | 1 + 3 files changed, 57 insertions(+) create mode 100644 pkg/deb/Makefile.wasm (limited to 'pkg') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 044b7226..bef68490 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -32,6 +32,7 @@ include Makefile.jsc17 include Makefile.jsc18 include Makefile.jsc19 include Makefile.jsc20 +include Makefile.wasm endif # Ubuntu 22.10 @@ -47,6 +48,7 @@ include Makefile.jsc11 include Makefile.jsc17 include Makefile.jsc18 include Makefile.jsc19 +include Makefile.wasm endif # Ubuntu 22.04 @@ -61,6 +63,7 @@ include Makefile.jsc-common include Makefile.jsc11 include Makefile.jsc17 include Makefile.jsc18 +include Makefile.wasm endif # Ubuntu 21.10 @@ -77,6 +80,7 @@ include Makefile.jsc11 include Makefile.jsc16 include Makefile.jsc17 include Makefile.jsc18 +include Makefile.wasm endif # Ubuntu 20.04 @@ -89,6 +93,7 @@ include Makefile.perl include Makefile.ruby include Makefile.jsc-common include Makefile.jsc11 +include Makefile.wasm endif # Ubuntu 18.04 @@ -104,6 +109,7 @@ include Makefile.ruby include Makefile.jsc-common include Makefile.jsc8 include Makefile.jsc11 +include Makefile.wasm endif # Debian 12 @@ -115,6 +121,7 @@ include Makefile.perl include Makefile.ruby include Makefile.jsc-common include Makefile.jsc17 +include Makefile.wasm endif # Debian 11 @@ -127,6 +134,7 @@ include Makefile.perl include Makefile.ruby include Makefile.jsc-common include Makefile.jsc11 +include Makefile.wasm endif # Debian 10 @@ -139,6 +147,7 @@ include Makefile.perl include Makefile.ruby include Makefile.jsc-common include Makefile.jsc11 +include Makefile.wasm endif CONFIGURE_ARGS_COMMON=\ diff --git a/pkg/deb/Makefile.wasm b/pkg/deb/Makefile.wasm new file mode 100644 index 00000000..da028f19 --- /dev/null +++ b/pkg/deb/Makefile.wasm @@ -0,0 +1,47 @@ +MODULES+= wasm +MODULE_SUFFIX_wasm= wasm + +MODULE_SUMMARY_wasm= WASM module for NGINX Unit + +MODULE_VERSION_wasm= $(VERSION) +MODULE_RELEASE_wasm= 1 + +MODULE_CONFARGS_wasm= wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/target/release +MODULE_MAKEARGS_wasm= wasm +MODULE_INSTARGS_wasm= wasm-install + +MODULE_SOURCES_wasm= + +BUILD_DEPENDS_wasm= +MODULE_BUILD_DEPENDS_wasm= +MODULE_DEPENDS_wasm= + +BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) + +define MODULE_PREBUILD_wasm + \$$(MAKE) -C pkg/contrib .wasmtime +endef +export MODULE_PREBUILD_wasm + +define MODULE_PREINSTALL_wasm +endef +export MODULE_PREINSTALL_wasm + +define MODULE_POSTINSTALL_wasm + mkdir -p debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ + install -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ +endef +export MODULE_POSTINSTALL_wasm + +define MODULE_POST_wasm +cat < Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: contrib: added libunit-wasm and wasi-sysroot. --- pkg/contrib/src/libunit-wasm/Makefile | 23 +++++++++++++++++++++++ pkg/contrib/src/libunit-wasm/version | 2 ++ pkg/contrib/src/wasi-sysroot/Makefile | 17 +++++++++++++++++ pkg/contrib/src/wasi-sysroot/SHA512SUMS | 1 + pkg/contrib/src/wasi-sysroot/version | 2 ++ 5 files changed, 45 insertions(+) create mode 100644 pkg/contrib/src/libunit-wasm/Makefile create mode 100644 pkg/contrib/src/libunit-wasm/version create mode 100644 pkg/contrib/src/wasi-sysroot/Makefile create mode 100644 pkg/contrib/src/wasi-sysroot/SHA512SUMS create mode 100644 pkg/contrib/src/wasi-sysroot/version (limited to 'pkg') diff --git a/pkg/contrib/src/libunit-wasm/Makefile b/pkg/contrib/src/libunit-wasm/Makefile new file mode 100644 index 00000000..51c24456 --- /dev/null +++ b/pkg/contrib/src/libunit-wasm/Makefile @@ -0,0 +1,23 @@ +# libunit-wasm + +include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version +LIBUNIT_WASM_URL := https://github.com/nginx/unit-wasm.git + +PKGS += libunit-wasm + +DEPS_libunit-wasm = wasi-sysroot $(DEPS_wasi-sysroot) + +$(TARBALLS)/libunit-wasm-$(LIBUNIT_WASM_GITHASH).tar.xz: + $(call download_git,$(LIBUNIT_WASM_URL),,$(LIBUNIT_WASM_GITHASH)) + +.sum-libunit-wasm: libunit-wasm-$(LIBUNIT_WASM_GITHASH).tar.xz + $(call check_githash,$(LIBUNIT_WASM_GITHASH)) + touch $@ + +libunit-wasm: libunit-wasm-$(LIBUNIT_WASM_GITHASH).tar.xz + $(UNPACK) + $(MOVE) + +.libunit-wasm: libunit-wasm + cd $< && CFLAGS= make WASI_SYSROOT=$(TOPSRC)wasi-sysroot V=1 libunit-wasm + touch $@ diff --git a/pkg/contrib/src/libunit-wasm/version b/pkg/contrib/src/libunit-wasm/version new file mode 100644 index 00000000..7ca15f98 --- /dev/null +++ b/pkg/contrib/src/libunit-wasm/version @@ -0,0 +1,2 @@ +LIBUNIT_WASM_VERSION := 0.1.0 +LIBUNIT_WASM_GITHASH := d6ed6a219b31a58526721f96195c80061d41ce54 diff --git a/pkg/contrib/src/wasi-sysroot/Makefile b/pkg/contrib/src/wasi-sysroot/Makefile new file mode 100644 index 00000000..fcfb8df3 --- /dev/null +++ b/pkg/contrib/src/wasi-sysroot/Makefile @@ -0,0 +1,17 @@ +# wasi-sysroot + +include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version +WASI_SYSROOT_URL := https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WASI_SYSROOT_VERSION_MAJOR)/wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz + +PKGS += wasi-sysroot + +$(TARBALLS)/wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz: + $(call download_pkg,$(WASI_SYSROOT_URL),wasi-sysroot) + +.sum-wasi-sysroot: wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz + +wasi-sysroot: wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz .sum-wasi-sysroot + $(UNPACK) + +.wasi-sysroot: wasi-sysroot + touch $@ diff --git a/pkg/contrib/src/wasi-sysroot/SHA512SUMS b/pkg/contrib/src/wasi-sysroot/SHA512SUMS new file mode 100644 index 00000000..a1e71fff --- /dev/null +++ b/pkg/contrib/src/wasi-sysroot/SHA512SUMS @@ -0,0 +1 @@ +ad4ad629d02f01f3d2eb977dd0bc43091b0f11ed1b5dd9fdb3580e4cf49c132f6cb4982ae80eabf638f0d08d0c4c7df40cceb2be8f9d2c29abc35b8564ffda42 wasi-sysroot-20.0.tar.gz diff --git a/pkg/contrib/src/wasi-sysroot/version b/pkg/contrib/src/wasi-sysroot/version new file mode 100644 index 00000000..919c7098 --- /dev/null +++ b/pkg/contrib/src/wasi-sysroot/version @@ -0,0 +1,2 @@ +WASI_SYSROOT_VERSION_MAJOR := 20 +WASI_SYSROOT_VERSION_MINOR := 0 -- cgit From 260494626b515b4e4af810ace22584ba8574ed0b Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: added libunit-wasm and headers to rpm packaging. --- pkg/rpm/unit.spec.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pkg') diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index b4e7863e..01323650 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -47,6 +47,8 @@ Requires(postun): systemd BuildRequires: pcre2-devel BuildRequires: pkgconfig +BuildRequires: clang +BuildRequires: llvm Provides: unit-r%{version} @@ -99,6 +101,10 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ %{__make} %{?_smp_mflags} %{__mv} build build-nodebug +%if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2}) +%{__make} %{?_smp_mflags} -C pkg/contrib .libunit-wasm +%endif + %install %{__rm} -rf %{buildroot} %{__ln_s} build-nodebug build @@ -136,6 +142,12 @@ DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/unit.service %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/unit-debug.service +%if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2}) +%{__mkdir} -p %{buildroot}%{_includedir}/unit/ +%{__install} -m 644 pkg/contrib/libunit-wasm/src/c/libunit-wasm.a %{buildroot}%{_libdir}/ +%{__install} -m 644 pkg/contrib/libunit-wasm/src/c/include/unit/unit-wasm.h %{buildroot}%{_includedir}/unit/ +%endif + QA_SKIP_BUILD_ROOT=1 export QA_SKIP_BUILD_ROOT @@ -221,6 +233,11 @@ BANNER %files devel %{_libdir}/libunit.a %{_libdir}/libunit-debug.a +%if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2}) +%{_libdir}/libunit-wasm.a +%dir %{_includedir}/unit +%{_includedir}/unit/*.h +%endif %{_includedir}/nxt_*.h %{_datadir}/pkgconfig/unit.pc -- cgit From bf3d5759ebc17ef6c5997861bf2a73abb46af0a7 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: added libunit-wasm and headers to deb packaging. --- pkg/deb/Makefile | 4 ++-- pkg/deb/debian/control.in | 4 +++- pkg/deb/debian/dirs | 1 + pkg/deb/debian/rules.in | 10 +++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) (limited to 'pkg') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index bef68490..3a77d7ef 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -241,7 +241,7 @@ debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian unit: check-build-depends-unit debuild/unit_$(VERSION).orig.tar.gz debuild/$(SRCDIR)/debian/changelog @echo "===> Building $@ package" - cd debuild/$(SRCDIR) && debuild -us -uc + cd debuild/$(SRCDIR) && debuild --preserve-envvar PATH --preserve-envvar RUSTUP_HOME -us -uc mkdir -p debs find debuild/ -maxdepth 1 -type f -exec cp {} debs/ \; ln -s debuild/$(SRCDIR)/build $@ @@ -314,7 +314,7 @@ endif unit-%: check-build-depends-% | debuild-% @echo "===> Building $@ package" - cd debuild-$*/$(SRCDIR) && debuild -us -uc + cd debuild-$*/$(SRCDIR) && debuild --preserve-envvar PATH --preserve-envvar RUSTUP_HOME -us -uc mkdir -p debs find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \; ln -s debuild-$*/$(SRCDIR)/build $@ diff --git a/pkg/deb/debian/control.in b/pkg/deb/debian/control.in index 579f41e3..bc757233 100644 --- a/pkg/deb/debian/control.in +++ b/pkg/deb/debian/control.in @@ -6,7 +6,9 @@ Build-Depends: debhelper (>= 11), linux-libc-dev, libssl-dev, libpcre2-dev, - pkg-config + pkg-config, + clang, + llvm Standards-Version: 4.1.4 Homepage: https://unit.nginx.org diff --git a/pkg/deb/debian/dirs b/pkg/deb/debian/dirs index 2568bac1..552cdf7c 100644 --- a/pkg/deb/debian/dirs +++ b/pkg/deb/debian/dirs @@ -1,4 +1,5 @@ usr/bin usr/sbin usr/lib/unit +usr/include/unit var/lib/unit diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 0d7cf830..55a4ebec 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -25,6 +25,11 @@ njs: cd pkg/contrib && make .njs touch $@ +libunit-wasm: + dh_testdir + cd pkg/contrib && make .libunit-wasm + touch $@ + config.env.%: njs dh_testdir mkdir -p $(BUILDDIR_$*) @@ -92,7 +97,7 @@ build-arch: build-arch.unit build-arch.unit_debug dh_testdir touch $@ -build: build-arch build-indep +build: build-arch build-indep libunit-wasm dh_testdir touch $@ @@ -123,6 +128,9 @@ install: build do.tests install -m 644 README.md $(INSTALLDIR)/usr/share/doc/unit/ install -m 644 CONTRIBUTING.md $(INSTALLDIR)/usr/share/doc/unit/ install -m 644 NOTICE $(INSTALLDIR)/usr/share/doc/unit/ + mkdir -p $(INSTALLDIR_dev)/usr/include/unit + install -m644 $(CURDIR)/pkg/contrib/libunit-wasm/src/c/libunit-wasm.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-wasm.a + install -m644 $(CURDIR)/pkg/contrib/libunit-wasm/src/c/include/unit/unit-wasm.h $(INSTALLDIR_dev)/usr/include/unit/ binary-indep: build install dh_testdir -- cgit From ffc6e6b08f4c5a6558f0cc85e597f9d7ae17701a Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Packages: specify runstatedir and logdir explicitely. --- pkg/deb/Makefile | 2 ++ pkg/docker/template.Dockerfile | 2 ++ pkg/rpm/Makefile | 2 ++ 3 files changed, 6 insertions(+) (limited to 'pkg') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 3a77d7ef..ce16068d 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -154,7 +154,9 @@ CONFIGURE_ARGS_COMMON=\ --prefix=/usr \ --statedir=/var/lib/unit \ --control="unix:/var/run/control.unit.sock" \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index c6a72aa8..b7c558a8 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -22,7 +22,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 0573bd4c..355f8a59 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -128,7 +128,9 @@ CONFIGURE_ARGS_COMMON=\ --prefix=/usr \ --statedir=%{_sharedstatedir}/unit \ --control="unix:/var/run/unit/control.sock" \ + --runstatedir=/var/run \ --pid=/var/run/unit/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit/unit.log \ --tmpdir=/var/tmp \ --user=unit \ -- cgit From e516d918ed47f456e38a44bdd1cf00fe862e1d85 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: introduced a "module prebuild" step. It's now used to install node-gyp on nodejs images. Starting from node:20, they no longer ship node-gyp that we require to build the modules with, so we need to install it manually. Fixes https://github.com/nginx/unit/issues/908. --- pkg/docker/Makefile | 11 ++++++++++- pkg/docker/template.Dockerfile | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index cb801253..0dca751a 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -17,6 +17,7 @@ CONTAINER_minimal ?= debian:$(VARIANT)-slim CONFIGURE_minimal ?= INSTALL_minimal ?= version RUN_minimal ?= /bin/true +MODULE_PREBUILD_minimal ?= /bin/true VERSIONS_go ?= 1.20 VARIANT_go ?= $(VARIANT) @@ -24,6 +25,7 @@ $(foreach goversion, $(VERSIONS_go), $(eval CONTAINER_go$(goversion) = golang:$( CONFIGURE_go ?= go --go-path=$$GOPATH INSTALL_go ?= go-install-src libunit-install RUN_go ?= /bin/true +MODULE_PREBUILD_go ?= /bin/true VERSIONS_jsc ?= 11 VARIANT_jsc ?= jammy @@ -31,13 +33,15 @@ $(foreach jscversion, $(VERSIONS_jsc), $(eval CONTAINER_jsc$(jscversion) = eclip CONFIGURE_jsc ?= java --jars=/usr/share/unit-jsc-common/ INSTALL_jsc ?= java-shared-install java-install RUN_jsc ?= /bin/true +MODULE_PREBUILD_jsc ?= /bin/true VERSIONS_node ?= 18 VARIANT_node ?= $(VARIANT) $(foreach nodeversion, $(VERSIONS_node), $(eval CONTAINER_node$(nodeversion) = node:$(nodeversion)-$(VARIANT_node))) -CONFIGURE_node ?= nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +CONFIGURE_node ?= nodejs --node-gyp=/usr/local/bin/node-gyp INSTALL_node ?= node node-install libunit-install RUN_node ?= /bin/true +MODULE_PREBUILD_node ?= npm -g install node-gyp VERSIONS_perl ?= 5.36 VARIANT_perl ?= $(VARIANT) @@ -45,6 +49,7 @@ $(foreach perlversion, $(VERSIONS_perl), $(eval CONTAINER_perl$(perlversion) = p CONFIGURE_perl ?= perl INSTALL_perl ?= perl-install RUN_perl ?= /bin/true +MODULE_PREBUILD_perl ?= /bin/true VERSIONS_php ?= 8.2 VARIANT_php ?= cli-$(VARIANT) @@ -52,6 +57,7 @@ $(foreach phpversion, $(VERSIONS_php), $(eval CONTAINER_php$(phpversion) = php:$ CONFIGURE_php ?= php INSTALL_php ?= php-install RUN_php ?= ldconfig +MODULE_PREBUILD_php ?= /bin/true VERSIONS_python ?= 3.11 VARIANT_python ?= $(VARIANT) @@ -59,6 +65,7 @@ $(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonvers CONFIGURE_python ?= python --config=/usr/local/bin/python3-config INSTALL_python ?= python3-install RUN_python ?= /bin/true +MODULE_PREBUILD_python ?= /bin/true VERSIONS_ruby ?= 3.2 VARIANT_ruby ?= $(VARIANT) @@ -66,6 +73,7 @@ $(foreach rubyversion, $(VERSIONS_ruby), $(eval CONTAINER_ruby$(rubyversion) = r CONFIGURE_ruby ?= ruby INSTALL_ruby ?= ruby-install RUN_ruby ?= gem install rack +MODULE_PREBUILD_ruby ?= /bin/true default: @echo "valid targets: all build dockerfiles library clean" @@ -86,6 +94,7 @@ Dockerfile.%: ../../version template.Dockerfile -e 's,@@CONFIGURE@@,$(CONFIGURE_$(call modname, $*)),g' \ -e 's,@@INSTALL@@,$(INSTALL_$(call modname, $*)),g' \ -e 's,@@RUN@@,$(RUN_$(call modname, $*)),g' \ + -e 's,@@MODULE_PREBUILD@@,$(MODULE_PREBUILD_$(call modname, $*)),g' \ > $@ build-%: Dockerfile.% diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index b7c558a8..cac0ae85 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && @@MODULE_PREBUILD@@ \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure @@CONFIGURE@@ \ && make -j $NCPU @@INSTALL@@ \ -- cgit From 7874798a3f372f614de2c314fc064d608e6194a8 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: use a specific directory to build unit. --- pkg/docker/template.Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index cac0ae85..28db58bc 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u @@VERSION@@-@@PATCHLEVEL@@ https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -52,7 +54,7 @@ RUN set -ex \ && ./configure @@CONFIGURE@@ \ && make -j $NCPU @@INSTALL@@ \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ -- cgit From 5ed7dd53c1630d106793f3a03f4afd92212f7f88 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: added wasm variant. --- pkg/docker/Makefile | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index 0dca751a..3373f8b2 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -8,7 +8,7 @@ DEFAULT_VERSION := $(NXT_VERSION) VERSION ?= $(DEFAULT_VERSION) PATCHLEVEL ?= 1 -MODULES ?= go jsc node perl php python ruby +MODULES ?= go jsc node perl php python ruby wasm VARIANT ?= bullseye @@ -75,10 +75,39 @@ INSTALL_ruby ?= ruby-install RUN_ruby ?= gem install rack MODULE_PREBUILD_ruby ?= /bin/true +VERSIONS_wasm ?= +CONTAINER_wasm ?= debian:$(VARIANT)-slim +CONFIGURE_wasm ?= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ +INSTALL_wasm ?= wasm-install +RUN_wasm ?= /bin/true +define MODULE_PREBUILD_wasm +export RUST_VERSION=1.71.0 \\\n \ +\ \ \ \&\& export RUSTUP_HOME=/usr/src/unit/rustup \\\n \ +\ \ \ \&\& export CARGO_HOME=/usr/src/unit/cargo \\\n \ +\ \ \ \&\& export PATH=/usr/src/unit/cargo/bin:\$$PATH \\\n \ +\ \ \ \&\& dpkgArch="\$$\(dpkg --print-architecture\)" \\\n \ +\ \ \ \&\& case "\$${dpkgArch##*-}" in \\\n \ +\ \ \ \ \ \ amd64\) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db" ;; \\\n \ +\ \ \ \ \ \ arm64\) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800" ;; \\\n \ +\ \ \ \ \ \ *\) echo \>\&2 "unsupported architecture: \$${dpkgArch}"; exit 1 ;; \\\n \ +\ \ \ \esac \\\n \ +\ \ \ \&\& url="https://static.rust-lang.org/rustup/archive/1.26.0/\$${rustArch}/rustup-init" \\\n \ +\ \ \ \&\& curl -L -O "\$$url" \\\n \ +\ \ \ \&\& echo "\$${rustupSha256} *rustup-init" | sha256sum -c - \\\n \ +\ \ \ \&\& chmod +x rustup-init \\\n \ +\ \ \ \&\& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain \$$RUST_VERSION --default-host \$${rustArch} \\\n \ +\ \ \ \&\& rm rustup-init \\\n \ +\ \ \ \&\& rustup --version \\\n \ +\ \ \ \&\& cargo --version \\\n \ +\ \ \ \&\& rustc --version \\\n \ +\ \ \ \&\& make -C pkg/contrib .wasmtime \\\n \ +\ \ \ \&\& install -pm 755 pkg/contrib/wasmtime/target/release/libwasmtime.so /usr/lib/\$$\(dpkg-architecture -q DEB_HOST_MULTIARCH\)/ +endef + default: @echo "valid targets: all build dockerfiles library clean" -MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) minimal +MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) wasm minimal modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-') -- cgit From 3562c68ce7040b56da5533d8dd4458cb54b9eede Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: added meaningful title to metadata. --- pkg/docker/Makefile | 1 + pkg/docker/template.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index 3373f8b2..6ec3f58b 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -124,6 +124,7 @@ Dockerfile.%: ../../version template.Dockerfile -e 's,@@INSTALL@@,$(INSTALL_$(call modname, $*)),g' \ -e 's,@@RUN@@,$(RUN_$(call modname, $*)),g' \ -e 's,@@MODULE_PREBUILD@@,$(MODULE_PREBUILD_$(call modname, $*)),g' \ + -e 's,@@MODULE@@,$*,g' \ > $@ build-%: Dockerfile.% diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index 28db58bc..f3dfc8ee 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -1,6 +1,6 @@ FROM @@CONTAINER@@ -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (@@MODULE@@)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" -- cgit From c79c60be1c83c268b65b167935448b86ee4c5f98 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: bumped language versions. --- pkg/docker/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index 6ec3f58b..742f6244 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -19,7 +19,7 @@ INSTALL_minimal ?= version RUN_minimal ?= /bin/true MODULE_PREBUILD_minimal ?= /bin/true -VERSIONS_go ?= 1.20 +VERSIONS_go ?= 1.20 1.21 VARIANT_go ?= $(VARIANT) $(foreach goversion, $(VERSIONS_go), $(eval CONTAINER_go$(goversion) = golang:$(goversion)-$(VARIANT_go))) CONFIGURE_go ?= go --go-path=$$GOPATH @@ -35,7 +35,7 @@ INSTALL_jsc ?= java-shared-install java-install RUN_jsc ?= /bin/true MODULE_PREBUILD_jsc ?= /bin/true -VERSIONS_node ?= 18 +VERSIONS_node ?= 18 20 VARIANT_node ?= $(VARIANT) $(foreach nodeversion, $(VERSIONS_node), $(eval CONTAINER_node$(nodeversion) = node:$(nodeversion)-$(VARIANT_node))) CONFIGURE_node ?= nodejs --node-gyp=/usr/local/bin/node-gyp @@ -43,7 +43,7 @@ INSTALL_node ?= node node-install libunit-install RUN_node ?= /bin/true MODULE_PREBUILD_node ?= npm -g install node-gyp -VERSIONS_perl ?= 5.36 +VERSIONS_perl ?= 5.36 5.38 VARIANT_perl ?= $(VARIANT) $(foreach perlversion, $(VERSIONS_perl), $(eval CONTAINER_perl$(perlversion) = perl:$(perlversion)-$(VARIANT_perl))) CONFIGURE_perl ?= perl -- cgit From f311b1f3aadfb0ee1d3a1175b1f12cf18da32ed6 Mon Sep 17 00:00:00 2001 From: RomainMou <58464216+RomainMou@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: avoid error if /docker-entrypoint.d already exists. Closes #865. --- pkg/docker/template.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index f3dfc8ee..803f5ca0 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -62,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && @@RUN@@ \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ -- cgit From 78a473743d98cd74dd3408a6a7800ca0d3c1a697 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: be POSIX-compliant in the library creation script. --- pkg/docker/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index 742f6244..e3a48cff 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -142,10 +142,10 @@ library: modname="$$( echo $$mod | tr -d '.0123456789-' )"; \ TAGS="$$mod $${mod%%.*} $$modname" ; \ TAGS="$$(echo $$TAGS | tr " " "\n" | sort -u -r | tr "\n" "," | sed "s/,/, /g")"; \ - if [ "$$previous" == "$$modname" ]; then \ + if [ "$$previous" = "$$modname" ]; then \ echo "Tags: $(VERSION)-$$mod, $$mod"; \ else \ - if [ "$$mod" == "minimal" ]; then \ + if [ "$$mod" = "minimal" ]; then \ echo "Tags: $(VERSION)-$$mod, $${TAGS%, }, latest"; \ else \ echo "Tags: $(VERSION)-$$mod, $${TAGS%, }"; \ -- cgit From c1f0aeaea4ab15073290e1677e23cd027da1b375 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: added a container-diff helper. It's useful to check whether resulting images have unexpected build leftovers. Requires https://github.com/GoogleContainerTools/container-diff in $PATH. --- pkg/docker/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index e3a48cff..bf4e67f2 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -159,6 +159,11 @@ library: previous=$$(echo $$mod | tr -d '.0123456789-'); \ done +diff: $(addprefix diff-, $(MODVERSIONS)) + +diff-%: + @echo container-diff diff --type file daemon://$(CONTAINER_$*) daemon://unit:$(VERSION)-$* + all: $(addprefix Dockerfile., $(MODVERSIONS)) clean: -- cgit From 9292710f2ebff0f340a220ee57e8fb5702120f8b Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: remove build-essential package. --- pkg/docker/template.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile index 803f5ca0..4d5cc101 100644 --- a/pkg/docker/template.Dockerfile +++ b/pkg/docker/template.Dockerfile @@ -74,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log -- cgit From 4caf3abbe41c55ac654f392b5f24245383bf5338 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: remove npm caches in node images. --- pkg/docker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index bf4e67f2..9cf08719 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -40,7 +40,7 @@ VARIANT_node ?= $(VARIANT) $(foreach nodeversion, $(VERSIONS_node), $(eval CONTAINER_node$(nodeversion) = node:$(nodeversion)-$(VARIANT_node))) CONFIGURE_node ?= nodejs --node-gyp=/usr/local/bin/node-gyp INSTALL_node ?= node node-install libunit-install -RUN_node ?= /bin/true +RUN_node ?= rm -rf /root/.cache/ \&\& rm -rf /root/.npm MODULE_PREBUILD_node ?= npm -g install node-gyp VERSIONS_perl ?= 5.36 5.38 -- cgit From 7af9f1a175e3dc7f92b6d5dedf5e936bebe490cd Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: remove maven caches in jsc images. --- pkg/docker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index 9cf08719..feb6eb06 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -32,7 +32,7 @@ VARIANT_jsc ?= jammy $(foreach jscversion, $(VERSIONS_jsc), $(eval CONTAINER_jsc$(jscversion) = eclipse-temurin:$(jscversion)-jdk-$(VARIANT_jsc))) CONFIGURE_jsc ?= java --jars=/usr/share/unit-jsc-common/ INSTALL_jsc ?= java-shared-install java-install -RUN_jsc ?= /bin/true +RUN_jsc ?= rm -rf /root/.m2 MODULE_PREBUILD_jsc ?= /bin/true VERSIONS_node ?= 18 20 -- cgit From 45bfba04bc62b9dba523cdbd20bcf9e6e4348bdf Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Docker: remove gem caches in ruby images. --- pkg/docker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index feb6eb06..237228a9 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -72,7 +72,7 @@ VARIANT_ruby ?= $(VARIANT) $(foreach rubyversion, $(VERSIONS_ruby), $(eval CONTAINER_ruby$(rubyversion) = ruby:$(rubyversion)-$(VARIANT_ruby))) CONFIGURE_ruby ?= ruby INSTALL_ruby ?= ruby-install -RUN_ruby ?= gem install rack +RUN_ruby ?= gem install rack \&\& rm -rf /root/.local MODULE_PREBUILD_ruby ?= /bin/true VERSIONS_wasm ?= -- cgit From 31ce5001a08690481e9ec34562a827f56e085b76 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: Regenerated Dockerfiles. --- pkg/docker/Dockerfile.go1.20 | 13 +++-- pkg/docker/Dockerfile.go1.21 | 89 ++++++++++++++++++++++++++++++++ pkg/docker/Dockerfile.jsc11 | 15 ++++-- pkg/docker/Dockerfile.minimal | 13 +++-- pkg/docker/Dockerfile.node18 | 19 ++++--- pkg/docker/Dockerfile.node20 | 89 ++++++++++++++++++++++++++++++++ pkg/docker/Dockerfile.perl5.36 | 13 +++-- pkg/docker/Dockerfile.perl5.38 | 89 ++++++++++++++++++++++++++++++++ pkg/docker/Dockerfile.php8.2 | 13 +++-- pkg/docker/Dockerfile.python3.11 | 13 +++-- pkg/docker/Dockerfile.ruby3.2 | 15 ++++-- pkg/docker/Dockerfile.wasm | 109 +++++++++++++++++++++++++++++++++++++++ 12 files changed, 453 insertions(+), 37 deletions(-) create mode 100644 pkg/docker/Dockerfile.go1.21 create mode 100644 pkg/docker/Dockerfile.node20 create mode 100644 pkg/docker/Dockerfile.perl5.38 create mode 100644 pkg/docker/Dockerfile.wasm (limited to 'pkg') diff --git a/pkg/docker/Dockerfile.go1.20 b/pkg/docker/Dockerfile.go1.20 index 50b4d5b3..b7842cf2 100644 --- a/pkg/docker/Dockerfile.go1.20 +++ b/pkg/docker/Dockerfile.go1.20 @@ -1,6 +1,6 @@ FROM golang:1.20-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (go1.20)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure go --go-path=$GOPATH \ && make -j $NCPU go-install-src libunit-install \ @@ -49,7 +54,7 @@ RUN set -ex \ && ./configure go --go-path=$GOPATH \ && make -j $NCPU go-install-src libunit-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ @@ -57,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && /bin/true \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.go1.21 b/pkg/docker/Dockerfile.go1.21 new file mode 100644 index 00000000..e038dbf1 --- /dev/null +++ b/pkg/docker/Dockerfile.go1.21 @@ -0,0 +1,89 @@ +FROM golang:1.21-bullseye + +LABEL org.opencontainers.image.title="Unit (go1.21)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " +LABEL org.opencontainers.image.version="1.30.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && /bin/true \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure go --go-path=$GOPATH \ + && make -j $NCPU go-install-src libunit-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure go --go-path=$GOPATH \ + && make -j $NCPU go-install-src libunit-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && /bin/true \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stdout /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/pkg/docker/Dockerfile.jsc11 b/pkg/docker/Dockerfile.jsc11 index bd987ae5..c8c79214 100644 --- a/pkg/docker/Dockerfile.jsc11 +++ b/pkg/docker/Dockerfile.jsc11 @@ -1,6 +1,6 @@ FROM eclipse-temurin:11-jdk-jammy -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (jsc11)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure java --jars=/usr/share/unit-jsc-common/ \ && make -j $NCPU java-shared-install java-install \ @@ -49,15 +54,15 @@ RUN set -ex \ && ./configure java --jars=/usr/share/unit-jsc-common/ \ && make -j $NCPU java-shared-install java-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ && apt-mark showmanual | xargs apt-mark auto > /dev/null \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ - && /bin/true \ + && rm -rf /root/.m2 \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 06a85b22..2492d397 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -1,6 +1,6 @@ FROM debian:bullseye-slim -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (minimal)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure \ && make -j $NCPU version \ @@ -49,7 +54,7 @@ RUN set -ex \ && ./configure \ && make -j $NCPU version \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ @@ -57,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && /bin/true \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.node18 b/pkg/docker/Dockerfile.node18 index b3fb46d3..c5ad637e 100644 --- a/pkg/docker/Dockerfile.node18 +++ b/pkg/docker/Dockerfile.node18 @@ -1,6 +1,6 @@ FROM node:18-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (node18)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,23 +45,24 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && npm -g install node-gyp \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ - && ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \ + && ./configure nodejs --node-gyp=/usr/local/bin/node-gyp \ && make -j $NCPU node node-install libunit-install \ && make clean \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ - && ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \ + && ./configure nodejs --node-gyp=/usr/local/bin/node-gyp \ && make -j $NCPU node node-install libunit-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ && apt-mark showmanual | xargs apt-mark auto > /dev/null \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ - && /bin/true \ + && rm -rf /root/.cache/ && rm -rf /root/.npm \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.node20 b/pkg/docker/Dockerfile.node20 new file mode 100644 index 00000000..8ef2517f --- /dev/null +++ b/pkg/docker/Dockerfile.node20 @@ -0,0 +1,89 @@ +FROM node:20-bullseye + +LABEL org.opencontainers.image.title="Unit (node20)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " +LABEL org.opencontainers.image.version="1.30.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && npm -g install node-gyp \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure nodejs --node-gyp=/usr/local/bin/node-gyp \ + && make -j $NCPU node node-install libunit-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure nodejs --node-gyp=/usr/local/bin/node-gyp \ + && make -j $NCPU node node-install libunit-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && rm -rf /root/.cache/ && rm -rf /root/.npm \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stdout /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/pkg/docker/Dockerfile.perl5.36 b/pkg/docker/Dockerfile.perl5.36 index 2dc31e53..fabb5119 100644 --- a/pkg/docker/Dockerfile.perl5.36 +++ b/pkg/docker/Dockerfile.perl5.36 @@ -1,6 +1,6 @@ FROM perl:5.36-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (perl5.36)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure perl \ && make -j $NCPU perl-install \ @@ -49,7 +54,7 @@ RUN set -ex \ && ./configure perl \ && make -j $NCPU perl-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ @@ -57,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && /bin/true \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.perl5.38 b/pkg/docker/Dockerfile.perl5.38 new file mode 100644 index 00000000..7ee53a80 --- /dev/null +++ b/pkg/docker/Dockerfile.perl5.38 @@ -0,0 +1,89 @@ +FROM perl:5.38-bullseye + +LABEL org.opencontainers.image.title="Unit (perl5.38)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " +LABEL org.opencontainers.image.version="1.30.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && /bin/true \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure perl \ + && make -j $NCPU perl-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure perl \ + && make -j $NCPU perl-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && /bin/true \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stdout /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/pkg/docker/Dockerfile.php8.2 b/pkg/docker/Dockerfile.php8.2 index fcf3f59e..7f27baf4 100644 --- a/pkg/docker/Dockerfile.php8.2 +++ b/pkg/docker/Dockerfile.php8.2 @@ -1,6 +1,6 @@ FROM php:8.2-cli-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (php8.2)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure php \ && make -j $NCPU php-install \ @@ -49,7 +54,7 @@ RUN set -ex \ && ./configure php \ && make -j $NCPU php-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ @@ -57,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && ldconfig \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.python3.11 b/pkg/docker/Dockerfile.python3.11 index 89cd315a..c30e48a9 100644 --- a/pkg/docker/Dockerfile.python3.11 +++ b/pkg/docker/Dockerfile.python3.11 @@ -1,6 +1,6 @@ FROM python:3.11-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (python3.11)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure python --config=/usr/local/bin/python3-config \ && make -j $NCPU python3-install \ @@ -49,7 +54,7 @@ RUN set -ex \ && ./configure python --config=/usr/local/bin/python3-config \ && make -j $NCPU python3-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ @@ -57,7 +62,7 @@ RUN set -ex \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ && /bin/true \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.ruby3.2 b/pkg/docker/Dockerfile.ruby3.2 index 4a6b60e4..da8f9861 100644 --- a/pkg/docker/Dockerfile.ruby3.2 +++ b/pkg/docker/Dockerfile.ruby3.2 @@ -1,6 +1,6 @@ FROM ruby:3.2-bullseye -LABEL org.opencontainers.image.title="Unit" +LABEL org.opencontainers.image.title="Unit (ruby3.2)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" @@ -13,6 +13,8 @@ RUN set -ex \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ @@ -22,7 +24,9 @@ RUN set -ex \ && CONFIGURE_ARGS_MODULES="--prefix=/usr \ --statedir=/var/lib/unit \ --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ --pid=/var/run/unit.pid \ + --logdir=/var/log \ --log=/var/log/unit.log \ --tmpdir=/var/tmp \ --user=unit \ @@ -41,6 +45,7 @@ RUN set -ex \ && make -j $NCPU unitd \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ + && /bin/true \ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ && ./configure ruby \ && make -j $NCPU ruby-install \ @@ -49,15 +54,15 @@ RUN set -ex \ && ./configure ruby \ && make -j $NCPU ruby-install \ && cd \ - && rm -rf unit \ + && rm -rf /usr/src/unit \ && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ done \ && apt-mark showmanual | xargs apt-mark auto > /dev/null \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ - && gem install rack \ + && gem install rack && rm -rf /root/.local \ && mkdir -p /var/lib/unit/ \ - && mkdir /docker-entrypoint.d/ \ + && mkdir -p /docker-entrypoint.d/ \ && groupadd --gid 999 unit \ && useradd \ --uid 999 \ @@ -69,7 +74,7 @@ RUN set -ex \ unit \ && apt-get update \ && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ - && apt-get purge -y --auto-remove \ + && apt-get purge -y --auto-remove build-essential \ && rm -rf /var/lib/apt/lists/* \ && rm -f /requirements.apt \ && ln -sf /dev/stdout /var/log/unit.log diff --git a/pkg/docker/Dockerfile.wasm b/pkg/docker/Dockerfile.wasm new file mode 100644 index 00000000..89333c07 --- /dev/null +++ b/pkg/docker/Dockerfile.wasm @@ -0,0 +1,109 @@ +FROM debian:bullseye-slim + +LABEL org.opencontainers.image.title="Unit (wasm)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " +LABEL org.opencontainers.image.version="1.30.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && export RUST_VERSION=1.71.0 \ + && export RUSTUP_HOME=/usr/src/unit/rustup \ + && export CARGO_HOME=/usr/src/unit/cargo \ + && export PATH=/usr/src/unit/cargo/bin:$PATH \ + && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db" ;; \ + arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800" ;; \ + *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ + esac \ + && url="https://static.rust-lang.org/rustup/archive/1.26.0/${rustArch}/rustup-init" \ + && curl -L -O "$url" \ + && echo "${rustupSha256} *rustup-init" | sha256sum -c - \ + && chmod +x rustup-init \ + && ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch} \ + && rm rustup-init \ + && rustup --version \ + && cargo --version \ + && rustc --version \ + && make -C pkg/contrib .wasmtime \ + && install -pm 755 pkg/contrib/wasmtime/target/release/libwasmtime.so /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure wasm --include-path=`pwd`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=/usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ \ + && make -j $NCPU wasm-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure wasm --include-path=`pwd`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=/usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ \ + && make -j $NCPU wasm-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && /bin/true \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stdout /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] -- cgit From fd43b1b0ce8682b5af7316a2ada1d88e20091dbf Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 23 Aug 2023 11:29:07 +0000 Subject: Generated Dockerfiles for Unit 1.31.0. --- pkg/docker/Dockerfile.go1.20 | 4 ++-- pkg/docker/Dockerfile.go1.21 | 4 ++-- pkg/docker/Dockerfile.jsc11 | 4 ++-- pkg/docker/Dockerfile.minimal | 4 ++-- pkg/docker/Dockerfile.node18 | 4 ++-- pkg/docker/Dockerfile.node20 | 4 ++-- pkg/docker/Dockerfile.perl5.36 | 4 ++-- pkg/docker/Dockerfile.perl5.38 | 4 ++-- pkg/docker/Dockerfile.php8.2 | 4 ++-- pkg/docker/Dockerfile.python3.11 | 4 ++-- pkg/docker/Dockerfile.ruby3.2 | 4 ++-- pkg/docker/Dockerfile.wasm | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'pkg') diff --git a/pkg/docker/Dockerfile.go1.20 b/pkg/docker/Dockerfile.go1.20 index b7842cf2..98f6d92f 100644 --- a/pkg/docker/Dockerfile.go1.20 +++ b/pkg/docker/Dockerfile.go1.20 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.go1.21 b/pkg/docker/Dockerfile.go1.21 index e038dbf1..18d3cc7b 100644 --- a/pkg/docker/Dockerfile.go1.21 +++ b/pkg/docker/Dockerfile.go1.21 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.jsc11 b/pkg/docker/Dockerfile.jsc11 index c8c79214..e7a057bd 100644 --- a/pkg/docker/Dockerfile.jsc11 +++ b/pkg/docker/Dockerfile.jsc11 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 2492d397..8c5ce0d5 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.node18 b/pkg/docker/Dockerfile.node18 index c5ad637e..735342dd 100644 --- a/pkg/docker/Dockerfile.node18 +++ b/pkg/docker/Dockerfile.node18 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.node20 b/pkg/docker/Dockerfile.node20 index 8ef2517f..f291ccfc 100644 --- a/pkg/docker/Dockerfile.node20 +++ b/pkg/docker/Dockerfile.node20 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.perl5.36 b/pkg/docker/Dockerfile.perl5.36 index fabb5119..2db7506d 100644 --- a/pkg/docker/Dockerfile.perl5.36 +++ b/pkg/docker/Dockerfile.perl5.36 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.perl5.38 b/pkg/docker/Dockerfile.perl5.38 index 7ee53a80..bd653cb1 100644 --- a/pkg/docker/Dockerfile.perl5.38 +++ b/pkg/docker/Dockerfile.perl5.38 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.php8.2 b/pkg/docker/Dockerfile.php8.2 index 7f27baf4..bd27a4dd 100644 --- a/pkg/docker/Dockerfile.php8.2 +++ b/pkg/docker/Dockerfile.php8.2 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.python3.11 b/pkg/docker/Dockerfile.python3.11 index c30e48a9..cdc96434 100644 --- a/pkg/docker/Dockerfile.python3.11 +++ b/pkg/docker/Dockerfile.python3.11 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.ruby3.2 b/pkg/docker/Dockerfile.ruby3.2 index da8f9861..8b870756 100644 --- a/pkg/docker/Dockerfile.ruby3.2 +++ b/pkg/docker/Dockerfile.ruby3.2 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.wasm b/pkg/docker/Dockerfile.wasm index 89333c07..852bc5d0 100644 --- a/pkg/docker/Dockerfile.wasm +++ b/pkg/docker/Dockerfile.wasm @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers " -LABEL org.opencontainers.image.version="1.30.0" +LABEL org.opencontainers.image.version="1.31.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && hg clone -u 1.30.0-1 https://hg.nginx.org/unit \ + && hg clone -u 1.31.0-1 https://hg.nginx.org/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ -- cgit