Created
March 26, 2018 17:06
-
-
Save akrylysov/fe6fb95bd6a0ce781ebd40a4ddf93efd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment