2019-03-05 09:14:20 +00:00
|
|
|
FROM golang:1.12-alpine as builder
|
2018-11-06 02:06:17 +00:00
|
|
|
WORKDIR /data
|
|
|
|
RUN apk add --no-cache make git build-base
|
|
|
|
COPY . .
|
|
|
|
RUN go build -o geoip .
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /data
|
|
|
|
COPY --from=builder /data/geoip /usr/bin
|
|
|
|
COPY scripts/download-geodb.sh /usr/bin
|
|
|
|
RUN apk add --no-cache ca-certificates wget curl && \
|
|
|
|
/usr/bin/download-geodb.sh
|
|
|
|
EXPOSE 10230
|
2019-03-05 09:14:20 +00:00
|
|
|
CMD ["/usr/bin/geoip"]
|