1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/freegeoip/Dockerfile

26 lines
780 B
Docker
Raw Normal View History

2018-11-28 08:05:02 +02:00
#
# Dockerfile for freegeoip
#
2023-04-25 12:28:24 +02:00
FROM alpine:3
2018-11-28 08:05:02 +02:00
MAINTAINER EasyPi Software Foundation
2023-04-25 12:28:24 +02:00
ARG FREEGEOIP_VERSION=3.4.1
ARG FREEGEOIP_FILE=freegeoip-${FREEGEOIP_VERSION}-linux-amd64.tar.gz
ARG FREEGEOIP_URL=https://github.com/fiorix/freegeoip/releases/download/v${FREEGEOIP_VERSION}/${FREEGEOIP_FILE}
2023-11-30 12:27:57 +02:00
ARG MMDB_URL=https://cdn.jsdelivr.net/npm/geolite2-city@1.0.4/GeoLite2-City.mmdb.gz
2018-11-28 08:05:02 +02:00
WORKDIR /opt/freegeoip
RUN set -xe \
2023-04-25 12:39:49 +02:00
&& apk add --no-cache curl tar wget \
2018-11-28 08:05:02 +02:00
&& curl -sSL ${FREEGEOIP_URL} | tar xz --strip 1 \
2023-04-25 12:39:49 +02:00
&& mkdir -p data \
&& wget -P data ${MMDB_URL} \
&& apk del curl tar wget
2020-01-09 11:22:20 +02:00
2018-11-28 08:05:02 +02:00
EXPOSE 8080 8888
ENTRYPOINT ["./freegeoip"]
2023-04-25 12:28:24 +02:00
CMD ["-public", "public", "-http", ":8080", "-internal-server", ":8888", "-db", "data/GeoLite2-City.mmdb.gz", "-use-x-forwarded-for"]