1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00

update freegeoip

This commit is contained in:
kev 2023-04-25 18:28:24 +08:00
parent e727bc3f68
commit f84f7c47bf
3 changed files with 16 additions and 21 deletions

View File

@ -2,12 +2,12 @@
# Dockerfile for freegeoip
#
FROM alpine
FROM alpine:3
MAINTAINER EasyPi Software Foundation
ENV FREEGEOIP_VERSION=3.4.1
ENV FREEGEOIP_FILE=freegeoip-${FREEGEOIP_VERSION}-linux-amd64.tar.gz
ENV FREEGEOIP_URL=https://github.com/fiorix/freegeoip/releases/download/v${FREEGEOIP_VERSION}/${FREEGEOIP_FILE}
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}
WORKDIR /opt/freegeoip
@ -21,4 +21,4 @@ COPY data/GeoLite2-City.mmdb.gz /opt/freegeoip/data/
EXPOSE 8080 8888
ENTRYPOINT ["./freegeoip"]
CMD ["-public", "public", "-http", ":8080", "-internal-server", ":8888", "-db", "data/GeoLite2-City.mmdb.gz"]
CMD ["-public", "public", "-http", ":8080", "-internal-server", ":8888", "-db", "data/GeoLite2-City.mmdb.gz", "-use-x-forwarded-for"]

View File

@ -1,16 +1,7 @@
freegeoip
=========
## docker-compose.yml
```yaml
freegeoip:
image: vimagick/freegeoip
ports:
- "8080:8080"
- "8888:8888"
restart: always
```
[freegeoip][1] provides a public HTTP API for software developers to search the geolocation of IP addresses.
## up and running
@ -44,3 +35,5 @@ go_gc_duration_seconds{quantile="0.75"} 0.000112867
go_gc_duration_seconds{quantile="1"} 0.000260533
go_gc_duration_seconds_sum 0.001055739
```
[1]: https://freegeoip.io/

View File

@ -1,6 +1,8 @@
freegeoip:
image: vimagick/freegeoip
ports:
- "8080:8080"
- "8888:8888"
restart: always
version: "3.8"
services:
freegeoip:
image: vimagick/freegeoip
ports:
- "8080:8080"
- "8888:8888"
restart: unless-stopped