Skip to content

Commit

Permalink
fix geoip2 download build
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Sep 28, 2022
1 parent 09bcc4d commit e720f22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ RUN cd /tmp \
&& dpkg -i nginx${NGINX_VERSION} \
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-module-njs gettext-base \
&& rm -rf /etc/nginx/conf.d/default.conf \
&& mkdir -p /var/log/nginx \
&& mkdir -p /var/log/nginx /etc/nginx/ssl \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& service nginx stop && update-rc.d -f nginx disable \
&& pip3 install requests \
&& pip3 install requests boto3 \
&& apt-get clean -y && apt-get autoclean -y \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
Expand All @@ -44,12 +44,11 @@ ADD ./files/root/ /root/
ADD ./files/sbin/ /sbin/

RUN bash /root/bin/dummycert.sh \
&& bash /etc/nginx/geoip2-download.sh \
&& mkdir -p /app-start/etc \
&& mv /etc/nginx /app-start/etc/nginx \
&& rm -rf /etc/nginx \
&& cd /app-start/etc/nginx \
&& ./geoip2-download.sh \
&& bash geoip2-download.sh \
&& ln -s /app/etc/nginx /etc/nginx \
&& mkdir -p /app-start/var/log \
&& mv /var/log/nginx /app-start/var/log/nginx \
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version: "3.3"
services:

redis:
image: niiknow/nginx-image-proxy:3.1.2
image: niiknow/nginx-image-proxy
container_name: nginx-image-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "./data/etc/nginx:/etc/nginx:rw"
- "./data:/app:rw"
ulimits:
nproc: 65535
nofile:
Expand Down
1 change: 0 additions & 1 deletion files/etc/nginx/geoip2-download.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
#
cd /etc/nginx
curl -sLo GeoLite2-ASN.mmdb https://git.io/GeoLite2-ASN.mmdb
curl -sLo GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb
curl -sLo GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb

0 comments on commit e720f22

Please sign in to comment.