From 3d0bc641f27cd6eccb39bba4fee37548607212d2 Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Fri, 14 Jun 2019 07:39:16 +0200 Subject: [PATCH] remove dockerbin target, fix dockerfile and update docker_repo in makefile Signed-off-by: Martin Buchleitner --- integrations/promunifi/Dockerfile | 4 ++-- integrations/promunifi/Makefile | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/integrations/promunifi/Dockerfile b/integrations/promunifi/Dockerfile index fd528bf1..6670bc50 100644 --- a/integrations/promunifi/Dockerfile +++ b/integrations/promunifi/Dockerfile @@ -12,11 +12,11 @@ COPY . $GOPATH/src/github.com/davidnewhall/unifi-poller WORKDIR $GOPATH/src/github.com/davidnewhall/unifi-poller RUN dep ensure \ - && make dockerbin + && CGO_ENABLED=0 make build FROM scratch -COPY --from=builder /go/src/github.com/davidnewhall/unifi-poller/unifi-poller.dockerbin /unifi-poller +COPY --from=builder /go/src/github.com/davidnewhall/unifi-poller/unifi-poller /unifi-poller COPY --from=builder /go/src/github.com/davidnewhall/unifi-poller/examples/up.conf.example /etc/unifi-poller/up.conf VOLUME [ "/etc/unifi-poller"] diff --git a/integrations/promunifi/Makefile b/integrations/promunifi/Makefile index 0ec85b3e..a1362bb1 100644 --- a/integrations/promunifi/Makefile +++ b/integrations/promunifi/Makefile @@ -9,7 +9,7 @@ OSX_PKG_PREFIX=com.github.davidnewhall GOLANGCI_LINT_ARGS=--enable-all -D gochecknoglobals PACKAGE:=./cmd/$(BINARY) LIBRARY:=./pkg/$(BINARY) -DOCKER_REPO="" +DOCKER_REPO="golift" ITERATION:=$(shell git rev-list --count HEAD||echo 0) ifeq ($(VERSION),) @@ -70,12 +70,6 @@ $(BINARY).linux: # Building linux binary. GOOS=linux go build -o $(BINARY).linux -ldflags "-w -s -X github.com/davidnewhall/unifi-poller/pkg/unifi-poller.Version=$(VERSION)" $(PACKAGE) -dockerbin: $(BINARY).dockerbin -$(BINARY).dockerbin: - # Building linux binary. - CGO_ENABLED=0 GOOS=linux go build -o $(BINARY).dockerbin -ldflags "-w -s -X github.com/davidnewhall/unifi-poller/pkg/unifi-poller.Version=$(VERSION)" $(PACKAGE) - - macos: $(BINARY).macos $(BINARY).macos: # Building darwin binary.