This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
FROM cr.wks/debian-golang
|
FROM cr.wks/debian-golang AS build
|
||||||
|
|
||||||
ENV GOARCH=arm64
|
ENV GOARCH=arm64
|
||||||
ENV GOPATH=/usr/src/gopath
|
ENV GOPATH=/usr/src/gopath
|
||||||
ENV GOCACHE=/usr/src/gocache
|
ENV GOCACHE=/usr/src/gocache
|
||||||
RUN go env
|
RUN go env
|
||||||
RUN cat /etc/os-release
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN go get github.com/sapcc/mosquitto-exporter
|
RUN go install github.com/sapcc/mosquitto-exporter@latest
|
||||||
RUN go mode download
|
#RUN go mod download
|
||||||
RUN make -j4 build CGO_ENABLED=0
|
|
||||||
RUN ls -al
|
FROM scratch
|
||||||
|
LABEL source_repository="https://github.com/sapcc/mosquitto-exporter"
|
||||||
|
|
||||||
|
COPY --from=build /usr/src/gopath/bin/mosquitto-exporter /mosquitto-exporter
|
||||||
|
|
||||||
|
EXPOSE 9234
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/mosquitto-exporter" ]
|
||||||
Reference in New Issue
Block a user