diff options
Diffstat (limited to 'pkg/docker/Makefile')
-rw-r--r-- | pkg/docker/Makefile | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index d8c53021..9dbca2d2 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -9,8 +9,9 @@ VERSION ?= $(DEFAULT_VERSION) PATCHLEVEL ?= 1 MODULES ?= go jsc node perl php python ruby wasm +MODULES_SLIM ?= python -VARIANT ?= bullseye +VARIANT ?= bookworm VERSIONS_minimal ?= CONTAINER_minimal ?= debian:$(VARIANT)-slim @@ -19,7 +20,7 @@ INSTALL_minimal ?= version RUN_minimal ?= /bin/true MODULE_PREBUILD_minimal ?= /bin/true -VERSIONS_go ?= 1.21 1.22 +VERSIONS_go ?= 1.22 1.23 VARIANT_go ?= $(VARIANT) $(foreach goversion, $(VERSIONS_go), $(eval CONTAINER_go$(goversion) = golang:$(goversion)-$(VARIANT_go))) CONFIGURE_go ?= go --go-path=$$GOPATH @@ -35,7 +36,7 @@ INSTALL_jsc ?= java-shared-install java-install RUN_jsc ?= rm -rf /root/.m2 MODULE_PREBUILD_jsc ?= /bin/true -VERSIONS_node ?= 20 21 +VERSIONS_node ?= 20 22 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 +44,7 @@ INSTALL_node ?= node node-install libunit-install RUN_node ?= rm -rf /root/.cache/ \&\& rm -rf /root/.npm MODULE_PREBUILD_node ?= npm -g install node-gyp -VERSIONS_perl ?= 5.36 5.38 +VERSIONS_perl ?= 5.38 5.40 VARIANT_perl ?= $(VARIANT) $(foreach perlversion, $(VERSIONS_perl), $(eval CONTAINER_perl$(perlversion) = perl:$(perlversion)-$(VARIANT_perl))) CONFIGURE_perl ?= perl @@ -62,6 +63,7 @@ MODULE_PREBUILD_php ?= /bin/true VERSIONS_python ?= 3.11 3.12 VARIANT_python ?= $(VARIANT) $(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonversion) = python:$(pythonversion)-$(VARIANT_python))) +$(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonversion)-slim = python:$(pythonversion)-slim-$(VARIANT_python))) CONFIGURE_python ?= python --config=/usr/local/bin/python3-config INSTALL_python ?= python3-install RUN_python ?= /bin/true @@ -83,17 +85,17 @@ RUN_wasm ?= /bin/true define MODULE_PREBUILD_wasm apt-get install --no-install-recommends --no-install-suggests -y libclang-dev \\\n \ -\ \ \ \&\& export RUST_VERSION=1.76.0 \\\n \ +\ \ \ \&\& export RUST_VERSION=1.80.1 \\\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 \ +\ \ \ \ \ \ amd64\) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \\\n \ +\ \ \ \ \ \ arm64\) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \\\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 \ +\ \ \ \&\& url="https://static.rust-lang.org/rustup/archive/1.27.1/\$${rustArch}/rustup-init" \\\n \ \ \ \ \&\& curl -L -O "\$$url" \\\n \ \ \ \ \&\& echo "\$${rustupSha256} *rustup-init" | sha256sum -c - \\\n \ \ \ \ \&\& chmod +x rustup-init \\\n \ @@ -109,9 +111,11 @@ 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))) wasm minimal +MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) +MODVERSIONS += $(foreach module, $(MODULES_SLIM), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion)-slim)) +MODVERSIONS += wasm minimal -modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-') +modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-' | sed 's/slim//') dockerfiles: $(addprefix Dockerfile., $(MODVERSIONS)) build: $(addprefix build-, $(MODVERSIONS)) @@ -132,6 +136,7 @@ Dockerfile.%: ../../version template.Dockerfile build-%: Dockerfile.% docker pull $(CONTAINER_$*) docker build --no-cache -t unit:$(VERSION)-$* -f Dockerfile.$* . + touch $@ library: @echo "# this file is generated via https://github.com/nginx/unit/blob/$(shell git describe --always --abbrev=0 HEAD)/pkg/docker/Makefile" @@ -141,10 +146,14 @@ library: @previous=""; \ for mod in $(MODVERSIONS); do \ echo ""; \ - modname="$$( echo $$mod | tr -d '.0123456789-' )"; \ - TAGS="$$mod $${mod%%.*} $$modname" ; \ + modname="$$( echo $$mod | tr -d '.0123456789')"; \ + modmajor="$${mod%%.*}"; \ + if test "$${mod#*slim}" != "$$mod"; then \ + modmajor="$${modmajor}-slim"; \ + fi; \ + TAGS="$$mod $$modmajor $$modname"; \ TAGS="$$(echo $$TAGS | tr " " "\n" | sort -u -r | tr "\n" "," | sed "s/,/, /g")"; \ - if [ "$$previous" = "$$modname" ]; then \ + if test "$${previous#*"$$modname"}" != "$$previous"; then \ echo "Tags: $(VERSION)-$$mod, $$mod"; \ else \ if [ "$$mod" = "minimal" ]; then \ @@ -158,7 +167,7 @@ library: echo "GitCommit: $(shell git describe --always --abbrev=0 HEAD)"; \ echo "Directory: pkg/docker"; \ echo "File: Dockerfile.$$mod"; \ - previous=$$(echo $$mod | tr -d '.0123456789-'); \ + previous="$$previous $$modname"; \ done diff: $(addprefix diff-, $(MODVERSIONS)) @@ -170,5 +179,6 @@ all: $(addprefix Dockerfile., $(MODVERSIONS)) clean: rm -f Dockerfile.* + rm -f build-* .PHONY: default build dockerfiles clean library |