{"id":15685540,"url":"https://github.com/levonet/docker-nginx","last_synced_at":"2025-10-27T20:39:32.765Z","repository":{"id":39260198,"uuid":"165730610","full_name":"levonet/docker-nginx","owner":"levonet","description":"NGINX docker build with CPU optimization and load balancer modules","archived":false,"fork":false,"pushed_at":"2024-11-28T14:15:36.000Z","size":210,"stargazers_count":14,"open_issues_count":3,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T00:04:03.992Z","etag":null,"topics":["brotli","docker","docker-nginx","dockerfile","jaeger","memcached","nginx","nginx-docker","nginx-proxy","njs","opentracing","postgresql","redis","sticky","stream"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/levonet/nginx","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levonet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-14T20:32:00.000Z","updated_at":"2024-09-05T10:34:21.000Z","dependencies_parsed_at":"2024-10-23T19:26:17.146Z","dependency_job_id":"e0d61000-adf8-4eb3-b915-e9c53967f8ca","html_url":"https://github.com/levonet/docker-nginx","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fdocker-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fdocker-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fdocker-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fdocker-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levonet","download_url":"https://codeload.github.com/levonet/docker-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582316,"owners_count":21771643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brotli","docker","docker-nginx","dockerfile","jaeger","memcached","nginx","nginx-docker","nginx-proxy","njs","opentracing","postgresql","redis","sticky","stream"],"created_at":"2024-10-03T17:26:21.809Z","updated_at":"2025-10-27T20:39:27.729Z","avatar_url":"https://github.com/levonet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supported tags and respective `Dockerfile` links\n\n- [`latest` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/master/Dockerfile)\n- [`1.23.2-alpine`, `1.23-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.23.2/Dockerfile) Mainline version\n- [`1.22.0-alpine`, `1.22-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.22.0/Dockerfile) Stable version\n- \u003cdetails\u003e\u003csummary\u003eOlder versions\u003c/summary\u003e\n\n  - [`1.21.6-alpine`, `1.21-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.21.6/Dockerfile)\n  - [`1.20.1-alpine`, `1.20-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.20.1/Dockerfile)\n  - [`1.19.10-alpine`, `1.19-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.19.10/Dockerfile)\n  - [`1.18.0-alpine`, `1.18-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.18.0/Dockerfile)\n  - [`1.17.10-alpine`, `1.17-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.17.10/Dockerfile)\n  - [`1.16.0-alpine`, `1.16-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.16.0/Dockerfile)\n  - [`1.15.12-alpine`, `1.15-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.15.12/Dockerfile)\n  - [`1.14.2-alpine`, `1.14-alpine` (*Dockerfile*)](https://github.com/levonet/docker-nginx/blob/v1.14.2/Dockerfile)\n\u003c/details\u003e\n\n# NGINX build with load balancer modules\n[![](https://images.microbadger.com/badges/image/levonet/nginx.svg)](https://microbadger.com/images/levonet/nginx \"Get your own image badge on microbadger.com\")\n[![Docker Pulls](https://img.shields.io/docker/pulls/levonet/nginx.svg)](https://hub.docker.com/r/levonet/nginx/)\n\n**Fastest** and **smaller** Nginx built for x86-64 CPU architecture.\nNginx binaries are compiled to leverage SSE 4.2 instruction set.\n\nThe difference from the [official Nginx docker image](https://hub.docker.com/_/nginx):\n\n- x86-64 CPU architecture only\n- with [njs scripting language](http://nginx.org/en/docs/njs/) dynamic module\n- with [Sticky](https://github.com/levonet/nginx-sticky-module-ng) dynamic module\n- with [Sync upstreams](https://github.com/weibocom/nginx-upsync-module#readme) dynamic module\n- with [Stream sync upstreams](https://github.com/xiaokai-wang/nginx-stream-upsync-module#readme) dynamic module\n- with [Upstream health check](https://github.com/levonet/nginx_upstream_check_module#readme) module\n- with [Brotli](https://github.com/google/ngx_brotli#readme) dynamic module\n- with [Various set_xxx directives](https://github.com/openresty/set-misc-nginx-module#readme) dynamic module\n- with [Headers more](https://github.com/openresty/headers-more-nginx-module#readme) dynamic module\n- with [SRCache](https://github.com/openresty/srcache-nginx-module) dynamic module\n- with [Memc](https://github.com/openresty/memc-nginx-module) dynamic module\n- with [PostgreSQL](https://github.com/openresty/ngx_postgres) dynamic module\n- with [Redis](https://www.nginx.com/resources/wiki/modules/redis/) dynamic module\n- with [Redis2](https://github.com/openresty/redis2-nginx-module) dynamic module\n- with [Resty DBD Streams to JSON](https://github.com/openresty/rds-json-nginx-module) dynamic module\n- with [Echo](https://github.com/openresty/echo-nginx-module) dynamic module\n- with [A forward proxy](https://github.com/chobits/ngx_http_proxy_connect_module) module\n- with [Opentracing](https://github.com/opentracing-contrib/nginx-opentracing) dynamic module\n  and [Jaeger](https://github.com/jaegertracing/jaeger-client-cpp) plugin\n- with degradation module\n- using `/etc/nginx/sites-enabled/` for virtual host configuration (like Ubuntu)\n- without modules: http_xslt, http_image_filter, http_sub, http_dav, http_flv, http_mp4, http_random_index, http_slice, mail, mail_ssl, http_geoip, stream_geoip\n\n## How to use this image\n\n### Hosting some simple static content\n\n```sh\ndocker run --name some-nginx -d -v /some/content:/usr/share/nginx/html:ro levonet/nginx\n```\n\n### Exposing ports\n\n```sh\ndocker run --name some-nginx -d -p 80:80 -e 443 -p 443:443 levonet/nginx\n```\n\n### Complex configuration\n\n```sh\ndocker run --name some-nginx -d -v /host/path/virtualhosts.d:/etc/nginx/sites-enabled:ro levonet/nginx\n```\nFor example porting Ubuntu nginx to docker:\n\n```sh\ndocker run --name some-nginx -d -p 80:80 -e 443 -p 443:443 \\\n    -v /etc/nginx/conf.d:/etc/nginx/conf.d \\\n    -v /etc/nginx/sites-available:/etc/nginx/sites-available \\\n    -v /etc/nginx/sites-enabled:/etc/nginx/sites-enabled \\\n    -v /var/log/nginx:/var/log/nginx \\\n    levonet/nginx\n```\n\n### Modules\n\nList dynamic modules in container:\n\n```sh\ndocker run -t --rm levonet/nginx ls /usr/lib/nginx/modules\n```\n\nExample of loading a module in `nginx.conf`:\n\n```\nload_module modules/ngx_http_js_module.so;\n```\n\n### njs scripts development\n\n```sh\ndocker run -it --rm levonet/nginx njs\n\u003e\u003e var a = {b: []};\nundefined\n\u003e\u003e console.log(a);\n{b:[]}\nundefined\n\u003e\u003e JSON.stringify(a);\n'{\"b\":[]}'\n\u003e\u003e\n```\n\n## Test \u0026 Examles\n\nSample configurations and module tests are located in a folder named `test`.\n\nTo run tests, go to the folder `test` and run command `make`.\n\nTo start a specific example, go to an example folder and run `docker-compose up`.\n\n## Image Variants\n\n### `levonet/nginx:\u003cversion\u003e-alpine`\n\nThis image is based on the popular [Alpine Linux project](http://alpinelinux.org/), available in [the `alpine` official image](https://hub.docker.com/_/alpine).\nAlpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.\n\nThis variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org/) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice.\nSee [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.\n\nTo minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).\n\n## License\n\nView [license information](http://nginx.org/LICENSE) for the software contained in this image or [license information](https://github.com/levonet/docker-nginx/blob/master/LICENSE) for the Nginx Dockerfile.\n\nAs with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).\n\nAs for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fdocker-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevonet%2Fdocker-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fdocker-nginx/lists"}