Update base image, minor tweaks

This commit is contained in:
2020-07-10 22:07:56 -07:00
parent ea8dd3fd77
commit 0ade0b9817
2 changed files with 3 additions and 3 deletions

View File

@@ -1,10 +1,10 @@
FROM golang:1.12.6-alpine3.9 AS build
FROM golang:1.14.7-alpine3.12 AS build
WORKDIR /go/src/github.com/abh/geoipapi
ADD . /go/src/github.com/abh/geoipapi
RUN go install -v ./...
FROM quay.io/ntppool/dnsmapper:geoip-data-201906
FROM quay.io/ntppool/dnsmapper:geoip-data-202007
USER root
RUN apk --no-cache add ca-certificates

View File

@@ -84,7 +84,7 @@ func getCity(req *http.Request) (*geoip2.City, error) {
ipStr := req.FormValue("ip")
ip := net.ParseIP(ipStr)
if ip == nil {
return nil, fmt.Errorf("Missing IP")
return nil, fmt.Errorf("missing IP address")
}
return getCityIP(ip)
}