@@ -7,7 +7,6 @@ NJS_DIR = internal/controller/nginx/modules/src
77KIND_CONFIG_FILE = $(SELF_DIR ) config/cluster/kind-cluster.yaml
88NGINX_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
99BUILD_AGENT = local
10- BASE_IMAGE ?= nginx:1.29.1-alpine-otel
1110
1211PROD_TELEMETRY_ENDPOINT = oss.edge.df.f5.com:443
1312# the telemetry related variables below are also configured in goreleaser.yml
@@ -44,7 +43,7 @@ HELM_SCHEMA_VERSION = 0.18.1
4443PREFIX ?= nginx-gateway-fabric# # The name of the NGF image. For example, nginx-gateway-fabric
4544NGINX_PREFIX ?= $(PREFIX ) /nginx# # The name of the nginx image. For example: nginx-gateway-fabric/nginx
4645NGINX_PLUS_PREFIX ?= $(PREFIX ) /nginx-plus# # The name of the nginx plus image. For example: nginx-gateway-fabric/nginx-plus
47- BUILD_OS ?= alpine # # The OS of the nginx image. Possible values: alpine and ubi
46+ BUILD_OS ?= # # The OS of the nginx image. Possible values: alpine and ubi
4847IMAGE_PULL_POLICY ?= Never# # The image pull policy for the NGF and nginx images. Possible values: Always, Never, IfNotPresent
4948TAG ?= $(VERSION:v%=% ) # # The tag of the image. For example, 1.1.0
5049TARGET ?= local# # The target of the build. Possible values: local and container
@@ -86,21 +85,21 @@ build-prod-ngf-image: build-ngf-image ## Build the NGF docker image for producti
8685
8786.PHONY : build-ngf-image
8887build-ngf-image : check-for-docker build # # Build the NGF docker image
89- docker build --platform linux/$(GOARCH ) --build-arg BUILD_AGENT=$(BUILD_AGENT ) --target $(strip $(TARGET ) ) -f $(SELF_DIR ) build/$(BUILD_OS ) / Dockerfile -t $(strip $(PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
88+ docker build --platform linux/$(GOARCH ) --build-arg BUILD_AGENT=$(BUILD_AGENT ) --target $(strip $(TARGET ) ) -f $(SELF_DIR ) build/$(if $( BUILD_OS ), $( BUILD_OS ) /) Dockerfile -t $(strip $(PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
9089
9190.PHONY : build-prod-nginx-image
9291build-prod-nginx-image : build-nginx-image # # Build the custom nginx image for production
9392
9493.PHONY : build-nginx-image
9594build-nginx-image : check-for-docker # # Build the custom nginx image
96- docker build --platform linux/$(GOARCH ) $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) -f $(SELF_DIR ) build/$(BUILD_OS ) / Dockerfile.nginx -t $(strip $(NGINX_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
95+ docker build --platform linux/$(GOARCH ) $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) -f $(SELF_DIR ) build/$(if $( BUILD_OS ), $( BUILD_OS ) /) Dockerfile.nginx -t $(strip $(NGINX_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
9796
9897.PHONY : build-prod-nginx-plus-image
9998build-prod-nginx-plus-image : build-nginx-plus-image # # Build the custom nginx plus image for production
10099
101100.PHONY : build-nginx-plus-image
102101build-nginx-plus-image : check-for-docker # # Build the custom nginx plus image
103- docker build --platform linux/$(GOARCH ) $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) $(strip $(NGINX_DOCKER_BUILD_PLUS_ARGS ) ) -f $(SELF_DIR ) build/$(BUILD_OS ) / Dockerfile.nginxplus -t $(strip $(NGINX_PLUS_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
102+ docker build --platform linux/$(GOARCH ) $(strip $(NGINX_DOCKER_BUILD_OPTIONS ) ) $(strip $(NGINX_DOCKER_BUILD_PLUS_ARGS ) ) -f $(SELF_DIR ) build/$(if $( BUILD_OS ), $( BUILD_OS ) /) Dockerfile.nginxplus -t $(strip $(NGINX_PLUS_PREFIX ) ) :$(strip $(TAG ) ) $(strip $(SELF_DIR ) )
104103
105104.PHONY : check-for-docker
106105check-for-docker : # # Check if Docker is installed
0 commit comments