From 65ffd0347969363381115d33359f18eeb716539f Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Mon, 22 Dec 2014 16:53:41 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 6 ++++-- Makefile | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 942f1b3..778376c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,9 @@ FROM golang:onbuild EXPOSE 8080 -ADD ./assets /go/bin/assets -ADD ./index.html /go/bin/ +ADD http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz /var/tmp/ +ADD index.html /go/bin/ +RUN gunzip /var/tmp/GeoLite2-Country.mmdb.gz +CMD ["-f", "/var/tmp/GeoLite2-Country.mmdb"] ENTRYPOINT ["/go/bin/app"] diff --git a/Makefile b/Makefile index b0bf273..1fc275b 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,11 @@ deps: go get -d -v build: - @mkdir bin + @mkdir -p bin go build -o bin/$(NAME) test: go test + +docker-image: + docker build -t martinp/ifconfig .