2019-12-15 11:10:37 +00:00
|
|
|
# minimal nginx
|
|
|
|
|
|
|
|
Nginx docker image with a minimal set of modules.
|
|
|
|
|
|
|
|
Current modules:
|
|
|
|
|
2020-03-06 16:32:11 +00:00
|
|
|
- [geoip2](https://github.com/leev/ngx_http_geoip2_module)
|
|
|
|
- stream
|
|
|
|
- http_ssl_module
|
|
|
|
- http_v2_module
|
|
|
|
- http_stub_status_module
|
2019-12-15 11:10:37 +00:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
Edit [conf.env](conf.env)
|
|
|
|
|
|
|
|
```bash
|
2019-12-15 16:57:44 +00:00
|
|
|
NGINX_VERSION=x.xx.x # Nginx version to build from
|
|
|
|
NGX_GEOIP2_VERSION=x.x # Nginx geoip2 version to build from
|
2019-12-15 11:10:37 +00:00
|
|
|
DOCKER_IMAGE=dcarrillo/nginx # Docker image
|
|
|
|
```
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
|
Build locally:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
./build.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
Build locally and upload to a registry (you must be logged in to the registry)
|
|
|
|
|
|
|
|
```bash
|
|
|
|
./build.sh --push
|
|
|
|
```
|
|
|
|
|
|
|
|
Build locally, tag image as latest and upload to a registry (you must be logged in to the registry)
|
|
|
|
|
|
|
|
```bash
|
|
|
|
./build.sh --push --latest
|
|
|
|
```
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
Prerequisites:
|
|
|
|
|
2020-03-06 16:32:11 +00:00
|
|
|
- docker
|
|
|
|
- openssl
|
|
|
|
- curl
|
2019-12-15 11:10:37 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# build local image
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
# run tests
|
|
|
|
./tests/test.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## Who is using this image
|
|
|
|
|
|
|
|
[ifconfig.es](https://ifconfig.es) is a web service that displays information about your
|
|
|
|
connection, including IP address, geolocation and request http headers. You can easily get
|
|
|
|
your public ip address using curl, wget and other command-line http clients.
|