diff --git a/Dockerfile b/Dockerfile index efda7e6..fa65218 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.9-fpm-alpine3.10 +FROM php:7.4.2-fpm-alpine3.11 LABEL maintainer="Ric Harvey " @@ -49,14 +49,14 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ --with-http_auth_request_module \ --with-http_xslt_module=dynamic \ --with-http_image_filter_module=dynamic \ - --with-http_geoip_module=dynamic \ +# --with-http_geoip_module=dynamic \ --with-http_perl_module=dynamic \ --with-threads \ --with-stream \ --with-stream_ssl_module \ --with-stream_ssl_preread_module \ --with-stream_realip_module \ - --with-stream_geoip_module=dynamic \ +# --with-stream_geoip_module=dynamic \ --with-http_slice_module \ --with-mail \ --with-mail_ssl_module \ @@ -65,7 +65,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ --with-http_v2_module \ --add-module=/usr/src/ngx_devel_kit-$DEVEL_KIT_MODULE_VERSION \ --add-module=/usr/src/lua-nginx-module-$LUA_MODULE_VERSION \ - --add-module=/usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ +# --add-module=/usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ " \ && addgroup -S nginx \ && adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \ @@ -82,7 +82,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ gnupg \ libxslt-dev \ gd-dev \ - geoip-dev \ + # geoip-dev \ libmaxminddb-dev \ perl-dev \ luajit-dev \ @@ -90,7 +90,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc \ && curl -fSL https://github.com/simpl/ngx_devel_kit/archive/v$DEVEL_KIT_MODULE_VERSION.tar.gz -o ndk.tar.gz \ && curl -fSL https://github.com/openresty/lua-nginx-module/archive/v$LUA_MODULE_VERSION.tar.gz -o lua.tar.gz \ - && curl -fSL https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_MODULE_VERSION.tar.gz -o ngx_http_geoip2_module.tar.gz \ +# && curl -fSL https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_MODULE_VERSION.tar.gz -o ngx_http_geoip2_module.tar.gz \ && export GNUPGHOME="$(mktemp -d)" \ && found=''; \ for server in \ @@ -109,17 +109,17 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && tar -zxC /usr/src -f nginx.tar.gz \ && tar -zxC /usr/src -f ndk.tar.gz \ && tar -zxC /usr/src -f lua.tar.gz \ - && tar -zxC /usr/src -f ngx_http_geoip2_module.tar.gz \ - && rm nginx.tar.gz ndk.tar.gz lua.tar.gz ngx_http_geoip2_module.tar.gz \ +# && tar -zxC /usr/src -f ngx_http_geoip2_module.tar.gz \ +# && rm nginx.tar.gz ndk.tar.gz lua.tar.gz ngx_http_geoip2_module.tar.gz \ && cd /usr/src/nginx-$NGINX_VERSION \ && ./configure $CONFIG --with-debug \ && make -j$(getconf _NPROCESSORS_ONLN) \ && mv objs/nginx objs/nginx-debug \ && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so \ && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so \ - && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \ +# && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \ && mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so \ - && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so \ +# && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so \ && ./configure $CONFIG \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ @@ -131,14 +131,14 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so \ && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so \ - && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so \ +# && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so \ && install -m755 objs/ngx_http_perl_module-debug.so /usr/lib/nginx/modules/ngx_http_perl_module-debug.so \ - && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so \ +# && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so \ && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules \ && strip /usr/sbin/nginx* \ && strip /usr/lib/nginx/modules/*.so \ && rm -rf /usr/src/nginx-$NGINX_VERSION \ - && rm -rf /usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ +# && rm -rf /usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ \ # Bring in gettext so we can get `envsubst`, then throw # the rest away. To do this, we need to install `gettext` @@ -200,14 +200,12 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo libjpeg-turbo-dev \ postgresql-dev && \ docker-php-ext-configure gd \ - --with-gd \ - --with-freetype-dir=/usr/include/ \ - --with-png-dir=/usr/include/ \ - --with-jpeg-dir=/usr/include/ && \ + --with-freetype \ + --with-jpeg && \ #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && \ - pecl install xdebug-2.7.2 && \ + pecl install xdebug-2.9.2 && \ pecl install -o -f redis && \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && \ docker-php-source delete && \ @@ -241,11 +239,12 @@ ADD conf/nginx-site.conf /etc/nginx/sites-available/default.conf ADD conf/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf RUN ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf +## disabled due to license changes (to fix in next release) # Add GeoLite2 databases (https://dev.maxmind.com/geoip/geoip2/geolite2/) -RUN curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz -o /etc/nginx/GeoLite2-City.mmdb.gz \ - && curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -o /etc/nginx/GeoLite2-Country.mmdb.gz \ - && gunzip /etc/nginx/GeoLite2-City.mmdb.gz \ - && gunzip /etc/nginx/GeoLite2-Country.mmdb.gz +#RUN curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz -o /etc/nginx/GeoLite2-City.mmdb.gz \ +# && curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -o /etc/nginx/GeoLite2-Country.mmdb.gz \ +# && gunzip /etc/nginx/GeoLite2-City.mmdb.gz \ +# && gunzip /etc/nginx/GeoLite2-Country.mmdb.gz # tweak php-fpm config RUN echo "cgi.fix_pathinfo=0" > ${php_vars} &&\ diff --git a/README.md b/README.md index 56523b8..9f472d2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.8.2 | Master Branch |1.16.1 | 7.3.9 | 3.10 | +| latest/1.9.0 | Master Branch |1.16.1 | 7.4.2 | 3.11 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 13c286f..0c2e088 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -63,16 +63,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; - fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; - fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; - fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; - fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; - fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; - fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; - fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; - fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; - fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; - fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; +# fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; +# fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; +# fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; +# fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; +# fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; +# fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; +# fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; +# fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; +# fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; +# fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 728ba5b..0b75de8 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -59,16 +59,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; - fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; - fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; - fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; - fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; - fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; - fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; - fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; - fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; - fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; - fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; +# fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; +# fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; +# fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; +# fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; +# fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; +# fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; +# fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; +# fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; +# fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; +# fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx.conf b/conf/nginx.conf index 2df8821..19f1b45 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,37 +33,38 @@ http { server_tokens off; #gzip on; - geoip2 /etc/nginx/GeoLite2-Country.mmdb { - auto_reload 1h; - - $geoip2_metadata_country_build metadata build_epoch; - - # populate the country - $geoip2_data_country_code source=$remote_addr country iso_code; - $geoip2_data_country_name source=$remote_addr country names en; - - # populate the continent - $geoip2_data_continent_code source=$remote_addr continent code; - $geoip2_data_continent_name source=$remote_addr continent names en; - } - - geoip2 /etc/nginx/GeoLite2-City.mmdb { - auto_reload 1h; - - # City name itself - $geoip2_data_city_name source=$remote_addr city names en; - - # Postal code will be an approximation, probably the first one in the list that covers an area - $geoip2_data_postal_code source=$remote_addr postal code; - - # State in code and long form - $geoip2_data_state_code source=$remote_addr subdivisions 0 iso_code; - $geoip2_data_state_name source=$remote_addr subdivisions 0 names en; - - # Lat and Lng - $geoip2_data_latitude source=$remote_addr location latitude; - $geoip2_data_longitude source=$remote_addr location longitude; - } +# Disabled due to license +# geoip2 /etc/nginx/GeoLite2-Country.mmdb { +# auto_reload 1h; +# +# $geoip2_metadata_country_build metadata build_epoch; +# +# # populate the country +# $geoip2_data_country_code source=$remote_addr country iso_code; +# $geoip2_data_country_name source=$remote_addr country names en; +# +# # populate the continent +# $geoip2_data_continent_code source=$remote_addr continent code; +# $geoip2_data_continent_name source=$remote_addr continent names en; +# } +# +# geoip2 /etc/nginx/GeoLite2-City.mmdb { +# auto_reload 1h; +# +# # City name itself +# $geoip2_data_city_name source=$remote_addr city names en; +# +# # Postal code will be an approximation, probably the first one in the list that covers an area +# $geoip2_data_postal_code source=$remote_addr postal code; +# +# # State in code and long form +# $geoip2_data_state_code source=$remote_addr subdivisions 0 iso_code; +# $geoip2_data_state_name source=$remote_addr subdivisions 0 names en; +# +# # Lat and Lng +# $geoip2_data_latitude source=$remote_addr location latitude; +# $geoip2_data_longitude source=$remote_addr location longitude; +# } include /etc/nginx/sites-enabled/*; } diff --git a/docs/versioning.md b/docs/versioning.md index 0172857..47c5c09 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -13,6 +13,16 @@ We will use the [semver](http://ricostacruz.com/cheatsheets/semver.html) style n The latest tag will always follow the master branch in git. the other versions will have releases attached. +#### PHP 7.4 + +| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | +|-----|-------|-----|--------|--------|----------| +| 1.9.0 | 7.4.2 |1.16.1 | 3.11 | 0.3.13 | upgrade to PHP 7.4.2 | + +These tags will be created on GitLab and as tags in docker hub. + +### Unmaintained tags: + #### PHP 7.3 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | @@ -35,9 +45,6 @@ The latest tag will always follow the master branch in git. the other versions w | 1.8.1 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | started python upgrade | | 1.8.2 | 7.3.9 |1.16.1 | 3.10 | 0.3.13 | geoip2, catchall and xdebug.remote merges | -These tags will be created on GitLab and as tags in docker hub. - -### Unmaintained tags: #### PHP 7.2 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts |