here we go
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-16 13:18:26 +01:00
parent 397dd88ebb
commit e811e80f25

View File

@@ -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" ]