just remove repo, it was a bad idea.

This commit is contained in:
David Newhall II 2019-07-07 17:21:47 -07:00
parent 35a5680f74
commit 62049ddb20
1 changed files with 5 additions and 8 deletions

View File

@ -1,20 +1,18 @@
#
# building static go binary with Debian golang container
#
ARG REPO=github.com/davidnewhall/unifi-poller
FROM golang:stretch as builder
ARG ARCH=amd64
ARG OS=linux
ARG REPO
RUN mkdir -p $GOPATH/pkg/mod $GOPATH/bin $GOPATH/src/${REPO}
RUN mkdir -p $GOPATH/pkg/mod $GOPATH/bin $GOPATH/src/github.com/davidnewhall/unifi-poller
RUN apt-get update \
&& apt-get install -y curl \
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
COPY . $GOPATH/src/${REPO}
WORKDIR $GOPATH/src/${REPO}
COPY . $GOPATH/src/github.com/davidnewhall/unifi-poller
WORKDIR $GOPATH/src/github.com/davidnewhall/unifi-poller
RUN dep ensure --vendor-only \
&& CGO_ENABLED=0 make unifi-poller.${ARCH}.${OS} \
@ -30,10 +28,9 @@ RUN dep ensure --vendor-only \
#
FROM scratch
ARG REPO
COPY --from=builder /go/src/${REPO}/unifi-poller /unifi-poller
COPY --from=builder /go/src/${REPO}/examples/up.conf.example /etc/unifi-poller}/up.conf
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" ]
ENTRYPOINT [ "/unifi-poller" ]