mirror of
https://github.com/dcarrillo/docker-nginx.git
synced 2025-01-06 21:26:47 +00:00
commit
7431aeb126
16
README.md
16
README.md
@ -4,11 +4,11 @@ Nginx docker image with a minimal set of modules.
|
|||||||
|
|
||||||
Current modules:
|
Current modules:
|
||||||
|
|
||||||
- [geoip2](https://github.com/leev/ngx_http_geoip2_module)
|
- [geoip2](https://github.com/leev/ngx_http_geoip2_module)
|
||||||
- stream
|
- stream
|
||||||
- http_ssl_module
|
- http_ssl_module
|
||||||
- http_v2_module
|
- http_v2_module
|
||||||
- http_stub_status_module
|
- http_stub_status_module
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@ -44,9 +44,9 @@ Build locally, tag image as latest and upload to a registry (you must be logged
|
|||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
- docker
|
- docker
|
||||||
- openssl
|
- openssl
|
||||||
- curl
|
- curl
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# build local image
|
# build local image
|
||||||
|
2
conf.env
2
conf.env
@ -1,3 +1,3 @@
|
|||||||
NGINX_VERSION=1.17.8
|
NGINX_VERSION=1.17.9
|
||||||
NGX_GEOIP2_VERSION=3.3
|
NGX_GEOIP2_VERSION=3.3
|
||||||
DOCKER_IMAGE=dcarrillo/nginx
|
DOCKER_IMAGE=dcarrillo/nginx
|
||||||
|
@ -74,12 +74,14 @@ docker run --name "${NGINX_VERSION}"_requester --rm --link "${NGINX_VERSION}"_te
|
|||||||
exec_docker="docker exec -i ${NGINX_VERSION}_requester"
|
exec_docker="docker exec -i ${NGINX_VERSION}_requester"
|
||||||
$exec_docker apk add curl > /dev/null
|
$exec_docker apk add curl > /dev/null
|
||||||
|
|
||||||
|
## Test 1 status code by protocol
|
||||||
for request in http://${NGINX_VERSION}_test/nginx_status https://${NGINX_VERSION}_test/nginx_status; do
|
for request in http://${NGINX_VERSION}_test/nginx_status https://${NGINX_VERSION}_test/nginx_status; do
|
||||||
printf "\nRequesting %s\n" "$request"
|
printf "\nRequesting %s\n" "$request"
|
||||||
STATUS_CODE=$($exec_docker curl -s -k -m 5 -o /dev/null -w "%{http_code}" "$request")
|
STATUS_CODE=$($exec_docker curl -s -k -m 5 -o /dev/null -w "%{http_code}" "$request")
|
||||||
_check_status_code "$STATUS_CODE"
|
_check_status_code "$STATUS_CODE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## Test 2 request my ip
|
||||||
request="http://${NGINX_VERSION}_test/ip"
|
request="http://${NGINX_VERSION}_test/ip"
|
||||||
printf "\nRequesting %s\n" "$request"
|
printf "\nRequesting %s\n" "$request"
|
||||||
RESPONSE=$($exec_docker curl -s -m 5 "$request" | tr -d '\r')
|
RESPONSE=$($exec_docker curl -s -m 5 "$request" | tr -d '\r')
|
||||||
|
Loading…
Reference in New Issue
Block a user