Skip to content

Commit e720f22

Browse files
committed
fix geoip2 download build
1 parent 09bcc4d commit e720f22

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ RUN cd /tmp \
3030
&& dpkg -i nginx${NGINX_VERSION} \
3131
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-module-njs gettext-base \
3232
&& rm -rf /etc/nginx/conf.d/default.conf \
33-
&& mkdir -p /var/log/nginx \
33+
&& mkdir -p /var/log/nginx /etc/nginx/ssl \
3434
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3535
&& ln -sf /dev/stderr /var/log/nginx/error.log \
3636
&& service nginx stop && update-rc.d -f nginx disable \
37-
&& pip3 install requests \
37+
&& pip3 install requests boto3 \
3838
&& apt-get clean -y && apt-get autoclean -y \
3939
&& apt-get autoremove --purge -y \
4040
&& rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
@@ -44,12 +44,11 @@ ADD ./files/root/ /root/
4444
ADD ./files/sbin/ /sbin/
4545

4646
RUN bash /root/bin/dummycert.sh \
47-
&& bash /etc/nginx/geoip2-download.sh \
4847
&& mkdir -p /app-start/etc \
4948
&& mv /etc/nginx /app-start/etc/nginx \
5049
&& rm -rf /etc/nginx \
5150
&& cd /app-start/etc/nginx \
52-
&& ./geoip2-download.sh \
51+
&& bash geoip2-download.sh \
5352
&& ln -s /app/etc/nginx /etc/nginx \
5453
&& mkdir -p /app-start/var/log \
5554
&& mv /var/log/nginx /app-start/var/log/nginx \

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ version: "3.3"
44
services:
55

66
redis:
7-
image: niiknow/nginx-image-proxy:3.1.2
7+
image: niiknow/nginx-image-proxy
88
container_name: nginx-image-proxy
99
ports:
1010
- "80:80"
1111
- "443:443"
1212
volumes:
13-
- "./data/etc/nginx:/etc/nginx:rw"
13+
- "./data:/app:rw"
1414
ulimits:
1515
nproc: 65535
1616
nofile:

files/etc/nginx/geoip2-download.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
#
3-
cd /etc/nginx
43
curl -sLo GeoLite2-ASN.mmdb https://git.io/GeoLite2-ASN.mmdb
54
curl -sLo GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb
65
curl -sLo GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb

0 commit comments

Comments
 (0)