@@ -5,7 +5,9 @@ CHART_DIR = $(SELF_DIR)charts/nginx-gateway-fabric
5
5
NGINX_CONF_DIR = internal/controller/nginx/conf
6
6
NJS_DIR = internal/controller/nginx/modules/src
7
7
KIND_CONFIG_FILE = $(SELF_DIR ) config/cluster/kind-cluster.yaml
8
+ NAP_WAF_ALPINE_VERSION = 3.19
8
9
NGINX_DOCKER_BUILD_PLUS_ARGS = --secret id=nginx-repo.crt,src=$(SELF_DIR ) nginx-repo.crt --secret id=nginx-repo.key,src=$(SELF_DIR ) nginx-repo.key
10
+ NGINX_DOCKER_BUILD_NAP_WAF_ARGS = --build-arg ALPINE_VERSION=$(NAP_WAF_ALPINE_VERSION ) --build-arg INCLUDE_NAP_WAF=true
9
11
BUILD_AGENT = local
10
12
11
13
PROD_TELEMETRY_ENDPOINT = oss.edge.df.f5.com:443
@@ -43,6 +45,7 @@ HELM_SCHEMA_VERSION = 0.18.1
43
45
PREFIX ?= nginx-gateway-fabric# # The name of the NGF image. For example, nginx-gateway-fabric
44
46
NGINX_PREFIX ?= $(PREFIX ) /nginx# # The name of the nginx image. For example: nginx-gateway-fabric/nginx
45
47
NGINX_PLUS_PREFIX ?= $(PREFIX ) /nginx-plus# # The name of the nginx plus image. For example: nginx-gateway-fabric/nginx-plus
48
+ NGINX_PLUS_WAF_PREFIX ?= $(PREFIX ) /nginx-plus-waf# # The name of the nginx plus image with NAP WAF. For example: nginx-gateway-fabric/nginx-plus-waf
46
49
TAG ?= $(VERSION:v%=% ) # # The tag of the image. For example, 1.1.0
47
50
TARGET ?= local# # The target of the build. Possible values: local and container
48
51
OUT_DIR ?= build/out# # The folder where the binary will be stored
@@ -77,6 +80,9 @@ build-images: build-ngf-image build-nginx-image ## Build the NGF and nginx docke
77
80
.PHONY : build-images-with-plus
78
81
build-images-with-plus : build-ngf-image build-nginx-plus-image # # Build the NGF and NGINX Plus docker images
79
82
83
+ .PHONY : build-images-nap-waf
84
+ build-images-with-nap-waf : build-ngf-image build-nginx-plus-image-with-nap-waf # # Build the NGF and NGINX Plus with WAF docker images
85
+
80
86
.PHONY : build-prod-ngf-image
81
87
build-prod-ngf-image : TELEMETRY_ENDPOINT=$(PROD_TELEMETRY_ENDPOINT )
82
88
build-prod-ngf-image : build-ngf-image # # Build the NGF docker image for production
@@ -99,6 +105,13 @@ build-prod-nginx-plus-image: build-nginx-plus-image ## Build the custom nginx pl
99
105
build-nginx-plus-image : check-for-docker # # Build the custom nginx plus image
100
106
docker build --platform linux/$(GOARCH ) $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) $(strip $(NGINX_DOCKER_BUILD_PLUS_ARGS ) ) -f $(SELF_DIR ) build/Dockerfile.nginxplus -t $(strip $(NGINX_PLUS_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
101
107
108
+ .PHONY : build-nginx-plus-image-with-nap-waf
109
+ build-nginx-plus-image-with-nap-waf : check-for-docker # # Build the custom nginx plus image with NAP WAF. Note that arm is NOT supported.
110
+ @if [ $( GOARCH) = " arm64" ]; then \
111
+ echo " \033[0;31mIMPORTANT:\033[0m The nginx-plus-waf image cannot be built for arm64 architecture and will be built for amd64." ; \
112
+ fi
113
+ docker build --platform linux/amd64 $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) $(strip $(NGINX_DOCKER_BUILD_PLUS_ARGS ) ) $(strip $(NGINX_DOCKER_BUILD_NAP_WAF_ARGS ) ) -f $(SELF_DIR ) build/Dockerfile.nginxplus -t $(strip $(NGINX_PLUS_WAF_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
114
+
102
115
.PHONY : check-for-docker
103
116
check-for-docker : # # Check if Docker is installed
104
117
@docker -v || (code=$$ ? ; printf " \033[0;31mError\033[0m: there was a problem with Docker\n" ; exit $$ code)
0 commit comments