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 GOPATH=/usr/src/gopath
|
||||
ENV GOCACHE=/usr/src/gocache
|
||||
RUN go env
|
||||
RUN cat /etc/os-release
|
||||
WORKDIR /usr/src
|
||||
RUN go get github.com/sapcc/mosquitto-exporter
|
||||
RUN go mode download
|
||||
RUN make -j4 build CGO_ENABLED=0
|
||||
RUN ls -al
|
||||
RUN go install github.com/sapcc/mosquitto-exporter@latest
|
||||
#RUN go mod download
|
||||
|
||||
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