11NGINX_PLUS_VERSION =19-1
22NGINX_IMAGE =nginxplus:$(NGINX_PLUS_VERSION )
3+ DOCKER_NETWORK? =test
4+ DOCKER_NGINX_PLUS? =nginx-plus
5+ DOCKER_NGINX_PLUS_HELPER? =nginx-plus-helper
36
47test : docker-build run-nginx-plus test-run configure-no-stream-block test-run-no-stream-block clean
58
@@ -10,24 +13,24 @@ docker-build:
1013 docker build --build-arg NGINX_PLUS_VERSION=$(NGINX_PLUS_VERSION ) ~stretch -t $(NGINX_IMAGE ) docker
1114
1215run-nginx-plus :
13- docker network create --driver bridge test
14- docker run --network=test -d --name nginx-plus --network-alias=nginx-plus-test --rm -p 8080:8080 -p 8081:8081 $(NGINX_IMAGE )
15- docker run --network=test -d --name nginx-plus-helper --network-alias=nginx-plus-test --rm -p 8090:8080 -p 8091:8081 $(NGINX_IMAGE )
16+ docker network create --driver bridge $( DOCKER_NETWORK )
17+ docker run --network=$( DOCKER_NETWORK ) -d --name $( DOCKER_NGINX_PLUS ) --network-alias=nginx-plus-test --rm -p 8080:8080 -p 8081:8081 $(NGINX_IMAGE )
18+ docker run --network=$( DOCKER_NETWORK ) -d --name $( DOCKER_NGINX_PLUS_HELPER ) --network-alias=nginx-plus-test --rm -p 8090:8080 -p 8091:8081 $(NGINX_IMAGE )
1619
1720test-run :
1821 go test client/*
1922 go clean -testcache
20- go test tests/client_test.go
23+ go test tests/client_test.go
2124
2225configure-no-stream-block :
23- docker cp docker/nginx_no_stream.conf nginx-plus :/etc/nginx/nginx.conf
24- docker exec nginx-plus nginx -s reload
26+ docker cp docker/nginx_no_stream.conf $( DOCKER_NGINX_PLUS ) :/etc/nginx/nginx.conf
27+ docker exec $( DOCKER_NGINX_PLUS ) nginx -s reload
2528
2629test-run-no-stream-block :
2730 go clean -testcache
2831 go test tests/client_no_stream_test.go
2932
3033clean :
31- -docker kill nginx-plus
32- -docker kill nginx-plus-helper
33- -docker network rm test
34+ -docker kill $( DOCKER_NGINX_PLUS )
35+ -docker kill $( DOCKER_NGINX_PLUS_HELPER )
36+ -docker network rm $( DOCKER_NETWORK )
0 commit comments