{"id":23197335,"url":"https://github.com/gokaygurcan/dockerfile-nginx","last_synced_at":"2025-08-18T23:31:49.845Z","repository":{"id":42127643,"uuid":"143209413","full_name":"gokaygurcan/dockerfile-nginx","owner":"gokaygurcan","description":"🐋  NGINX Dockerfile","archived":false,"fork":false,"pushed_at":"2024-07-23T11:54:41.000Z","size":136,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-23T13:57:39.926Z","etag":null,"topics":["docker","dockerfile","hacktoberfest","hacktoberfest2022","letsencrypt","nginx","nginx-modules","openssl","web-server"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/gokaygurcan/nginx/","language":"Dockerfile","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/gokaygurcan.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-01T21:14:48.000Z","updated_at":"2024-07-23T11:54:44.000Z","dependencies_parsed_at":"2024-07-23T13:44:21.073Z","dependency_job_id":"2eda3e2d-7559-4656-85b4-5b35e0ac6812","html_url":"https://github.com/gokaygurcan/dockerfile-nginx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokaygurcan%2Fdockerfile-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokaygurcan%2Fdockerfile-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokaygurcan%2Fdockerfile-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokaygurcan%2Fdockerfile-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gokaygurcan","download_url":"https://codeload.github.com/gokaygurcan/dockerfile-nginx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230286822,"owners_count":18202760,"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":["docker","dockerfile","hacktoberfest","hacktoberfest2022","letsencrypt","nginx","nginx-modules","openssl","web-server"],"created_at":"2024-12-18T14:35:17.440Z","updated_at":"2025-08-18T23:31:49.832Z","avatar_url":"https://github.com/gokaygurcan.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX\n\n## Environment variables\n\n| Variable             | Path                   |\n| -------------------- | ---------------------- |\n| USR_SRC              | /usr/src               |\n| USR_SRC_NGINX        | /usr/src/nginx         |\n| USR_SRC_NGINX_MODS   | /usr/src/nginx/modules |\n\n| Variable             | Version                |\n| -------------------- | ---------------------- |\n| NGINX_VERSION        | 1.29.0                 |\n| OPENSSL_VERSION      | 3.5.0                  |\n| LIBMAXMINDDB_VERSION | 1.12.2                 |\n\n## Additional packages\n\n- libbrotli-dev\n- libmaxminddb-dev\n- libpcre3\n- libpcre3-dev\n- libxml2\n- libxml2-dev\n- libxslt1-dev\n- mmdb-bin\n- uuid-dev\n- zlib1g\n- zlib1g-dev\n\n## Volumes\n\n| Path             | Description                                                                            |\n| ---------------- | -------------------------------------------------------------------------------------- |\n| /etc/nginx       | NGINX configurations                                                                   |\n| /var/log/nginx   | NGINX logs                                                                             |\n| /var/www         | Default www folder                                                                     |\n| /etc/letsencrypt | Let's Encrypt files (see [certbot](https://github.com/gokaygurcan/dockerfile-certbot)) |\n| /usr/share/GeoIP | GeoIP database folder (see below)                                                      |\n\n## Ports\n\n| Port | Process | TCP/UDP |\n| ---- | ------- | ------- |\n| 80   | NGINX   | TCP     |\n| 443  | NGINX   | TCP     |\n\n## CMD\n\n```bash\nsudo nginx -g daemon off;\n```\n\n## Usage\n\nTo pull the image\n\n```bash\ndocker pull gokaygurcan/nginx\n```\n\nTo run an NGINX container\n\n```bash\n# clone this repository\ngit clone https://github.com/gokaygurcan/dockerfile-nginx.git\n\n# cd into it\ncd dockerfile-nginx\n\n# run nginx with the default configurations\ndocker run --rm -d --name nginx -p 80:80 -p 443:443 \\\n  -v `pwd`/docker/etc/nginx:/etc/nginx \\\n  gokaygurcan/nginx\n\n# see if cURL returns anything good\ncurl -i http://localhost\n```\n\n## GeoIP\n\nTo use GeoIP, you need to download City and/or Country databases from MaxMind. The best way to do it is to use their Docker container.\n\n```bash\n# create a volume for persistency\ndocker volume create usr-share-geoip\n\n# download geoip databases\ndocker run --rm --name geoipupdate \\\n  -v usr-share-geoip:/usr/share/GeoIP \\\n  -e GEOIPUPDATE_FREQUENCY=0 \\\n  -e GEOIPUPDATE_ACCOUNT_ID='\u003cyour account id\u003e' \\\n  -e GEOIPUPDATE_LICENSE_KEY='\u003cyour license key\u003e' \\\n  -e GEOIPUPDATE_EDITION_IDS='GeoLite2-City GeoLite2-Country' \\\n  maxmindinc/geoipupdate\n\n# you can start nginx with this additional volume now\ndocker run --rm -d --name nginx -p 80:80 -p 443:443 \\\n  -v `pwd`/docker/etc/nginx:/etc/nginx \\\n  -v usr-share-geoip:/usr/share/GeoIP \\\n  gokaygurcan/nginx\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokaygurcan%2Fdockerfile-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokaygurcan%2Fdockerfile-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokaygurcan%2Fdockerfile-nginx/lists"}