File tree 5 files changed +11
-9
lines changed
5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
# 0.0.0 shouldn't clobber any released builds
16
- TAG ?= 0.73
16
+ TAG ?= 0.74
17
17
REGISTRY ?= quay.io/kubernetes-ingress-controller
18
18
ARCH ?= $(shell go env GOARCH)
19
19
DOCKER ?= docker
Original file line number Diff line number Diff line change @@ -109,18 +109,16 @@ mkdir -p /etc/nginx
109
109
# Get the GeoIP data
110
110
GEOIP_FOLDER=/etc/nginx/geoip
111
111
mkdir -p $GEOIP_FOLDER
112
- function geoip_get {
113
- wget -O $GEOIP_FOLDER /$1 $2 || { echo " Could not download $1 , exiting." ; exit 1; }
114
- gunzip $GEOIP_FOLDER /$1
115
- }
112
+
116
113
function geoip2_get {
117
114
wget -O $GEOIP_FOLDER /$1 .tar.gz $2 || { echo " Could not download $1 , exiting." ; exit 1; }
118
- mkdir $GEOIP_FOLDER /$1 && tar xf $GEOIP_FOLDER /$1 .tar.gz -C $GEOIP_FOLDER /$1 --strip-components 1 && mv $GEOIP_FOLDER /$1 /$1 .mmdb $GEOIP_FOLDER /$1 .mmdb && rm -rf $GEOIP_FOLDER /$1
115
+ mkdir $GEOIP_FOLDER /$1 \
116
+ && tar xf $GEOIP_FOLDER /$1 .tar.gz -C $GEOIP_FOLDER /$1 --strip-components 1 \
117
+ && mv $GEOIP_FOLDER /$1 /$1 .mmdb $GEOIP_FOLDER /$1 .mmdb \
118
+ && rm -rf $GEOIP_FOLDER /$1 \
119
+ && rm -rf $GEOIP_FOLDER /$1 .tar.gz
119
120
}
120
121
121
- geoip_get " GeoIPASNum.dat.gz" " http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz"
122
- geoip_get " GeoIP.dat.gz" " https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz"
123
- geoip_get " GeoLiteCity.dat.gz" " https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
124
122
geoip2_get " GeoLite2-City" " http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz"
125
123
geoip2_get " GeoLite2-ASN" " http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz"
126
124
@@ -567,6 +565,10 @@ rm -rf /etc/nginx/owasp-modsecurity-crs/util/regression-tests
567
565
568
566
rm -rf $HOME /.hunter
569
567
568
+ # move geoip directory
569
+ mv /geoip/* /etc/nginx/geoip
570
+ rm -rf /geoip
571
+
570
572
# update image permissions
571
573
writeDirs=( \
572
574
/etc/nginx \
You can’t perform that action at this time.
0 commit comments