forked from thehowl/ip.zxq.co
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.dev
More file actions
27 lines (19 loc) · 720 Bytes
/
Dockerfile.dev
File metadata and controls
27 lines (19 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# scratch downloads
FROM scratch as scratch
ADD https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz /app/
ADD https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz /app/
ADD https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz /app/
RUN mkdir /dist/ && \
cd /app/ && \
tar -xzvf GeoLite2-ASN.tar.gz && \
tar -xzvf GeoLite2-City.tar.gz && \
tar -xzvf GeoLite2-Country.tar.gz && \
cp */*.mmdb /dist/
# set up environment
FROM golang:1.13-alpine AS build
ARG BUILDPATH=github.com/jnovack/docker-ipinfo
COPY --from=scratch /dist/*.mmdb /app/
RUN apk -U add git
COPY * /go/src/${BUILDPATH}/
RUN go get -v
WORKDIR /go/src/${BUILDPATH}/