updated to php 7.4.2 but geoip is broken - to fix
This commit is contained in:
43
Dockerfile
43
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 <ric@ngd.io>"
|
||||
|
||||
@@ -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} &&\
|
||||
|
||||
Reference in New Issue
Block a user