diff --git a/Dockerfile b/Dockerfile index 4bf14f9..08be0ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,14 @@ -FROM scratch +FROM alpine -ADD https://rootcastore.hub.luzifer.io/v1/store/latest /etc/ssl/ca-bundle.pem -ADD promcertcheck /promcertcheck +ENV GOPATH /go:/go/src/github.com/Luzifer/promcertcheck/Godeps/_workspace + +ADD . /go/src/github.com/Luzifer/promcertcheck +WORKDIR /go/src/github.com/Luzifer/promcertcheck + +RUN apk --update add git go ca-certificates \ + && go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short || echo dev)" \ + && apk --purge del git go EXPOSE 3000 -ENTRYPOINT ["/promcertcheck"] +ENTRYPOINT ["/go/bin/promcertcheck"] CMD ["--probe=https://www.google.com/", "--probe=https://www.facebook.com/"] diff --git a/Makefile b/Makefile index 3ed0588..36aaf9b 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,5 @@ test: --probe="https://www.itpad.de/" \ --probe="https://mondash.org/" -container: build +container: docker build -t luzifer/promcertcheck . - -build: - docker run -v $(CURDIR):/src -e LDFLAGS='-X main.version $(VERSION)' centurylink/golang-builder:latest