Skip to content

Instantly share code, notes, and snippets.

@akrylysov
Created March 26, 2018 17:06
Show Gist options
  • Save akrylysov/fe6fb95bd6a0ce781ebd40a4ddf93efd to your computer and use it in GitHub Desktop.
Save akrylysov/fe6fb95bd6a0ce781ebd40a4ddf93efd to your computer and use it in GitHub Desktop.

Revisions

  1. akrylysov created this gist Mar 26, 2018.
    12 changes: 12 additions & 0 deletions Dockerfile-geoipupdate
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    FROM ubuntu:16.04
    RUN echo "deb http://ppa.launchpad.net/maxmind/ppa/ubuntu trusty main" > /etc/apt/sources.list.d/maxmind.list \
    && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "DE742AFA" \
    && apt-get update \
    && apt-get install -y cron geoipupdate \
    && apt-get -qy autoremove \
    && apt-get clean \
    && rm -r /var/lib/apt/lists/*
    RUN touch /var/log/cron.log
    RUN (crontab -l ; echo "15 0 * * * geoipupdate -v > /proc/1/fd/1 2>/proc/1/fd/2") | crontab
    COPY GeoIP.conf /etc/GeoIP.conf
    CMD ["/bin/bash", "-c", "geoipupdate -v; cron -f"]