just remove repo, it was a bad idea.
This commit is contained in:
parent
35a5680f74
commit
62049ddb20
|
|
@ -1,20 +1,18 @@
|
||||||
#
|
#
|
||||||
# building static go binary with Debian golang container
|
# building static go binary with Debian golang container
|
||||||
#
|
#
|
||||||
ARG REPO=github.com/davidnewhall/unifi-poller
|
|
||||||
|
|
||||||
FROM golang:stretch as builder
|
FROM golang:stretch as builder
|
||||||
ARG ARCH=amd64
|
ARG ARCH=amd64
|
||||||
ARG OS=linux
|
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 \
|
RUN apt-get update \
|
||||||
&& apt-get install -y curl \
|
&& apt-get install -y curl \
|
||||||
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||||
|
|
||||||
COPY . $GOPATH/src/${REPO}
|
COPY . $GOPATH/src/github.com/davidnewhall/unifi-poller
|
||||||
WORKDIR $GOPATH/src/${REPO}
|
WORKDIR $GOPATH/src/github.com/davidnewhall/unifi-poller
|
||||||
|
|
||||||
RUN dep ensure --vendor-only \
|
RUN dep ensure --vendor-only \
|
||||||
&& CGO_ENABLED=0 make unifi-poller.${ARCH}.${OS} \
|
&& CGO_ENABLED=0 make unifi-poller.${ARCH}.${OS} \
|
||||||
|
|
@ -30,10 +28,9 @@ RUN dep ensure --vendor-only \
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ARG REPO
|
|
||||||
|
|
||||||
COPY --from=builder /go/src/${REPO}/unifi-poller /unifi-poller
|
COPY --from=builder /go/src/github.com/davidnewhall/unifi-poller/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/examples/up.conf.example /etc/unifi-poller}/up.conf
|
||||||
|
|
||||||
VOLUME [ "/etc/unifi-poller" ]
|
VOLUME [ "/etc/unifi-poller" ]
|
||||||
ENTRYPOINT [ "/unifi-poller" ]
|
ENTRYPOINT [ "/unifi-poller" ]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue