Private GIT

Skip to content
Snippets Groups Projects
Commit 93c12938 authored by Richard Mitchell's avatar Richard Mitchell
Browse files

Use promu for dockerized builds

parent 5698d182
Branches
Tags
No related merge requests found
FROM amd64/golang:stretch
RUN go get -u github.com/prometheus/promu
COPY . /go/src/github.com/mitchellrj/hue_exporter
WORKDIR /go/src/github.com/mitchellrj/hue_exporter
VOLUME /build
CMD go build -o /build/hue_exporter.amd64
CMD promu build && mv hue_exporter /build/hue_exporter.amd64
FROM amd64/golang:alpine
RUN go get -u github.com/prometheus/promu
COPY . /go/src/github.com/mitchellrj/hue_exporter
WORKDIR /go/src/github.com/mitchellrj/hue_exporter
VOLUME /build
CMD go build -o /build/hue_exporter.amd64.musl
CMD promu build && mv hue_exporter /build/hue_exporter.amd64.musl
FROM arm32v7/golang:stretch
RUN go get -u github.com/prometheus/promu
COPY . /go/src/github.com/mitchellrj/hue_exporter
WORKDIR /go/src/github.com/mitchellrj/hue_exporter
VOLUME /build
CMD go build -o /build/hue_exporter.arm7
CMD promu build && mv hue_exporter /build/hue_exporter.arm7
......@@ -2,8 +2,9 @@ FROM armhf/alpine:latest
RUN apk add --no-cache git go musl-dev && mkdir /go
ENV GOPATH=/go
RUN go get -u github.com/prometheus/promu
COPY . /go/src/github.com/mitchellrj/hue_exporter
WORKDIR /go/src/github.com/mitchellrj/hue_exporter
VOLUME /build
CMD go build -o /build/hue_exporter.arm7.musl
CMD promu build && mv hue_exporter /build/hue_exporter.arm7.musl
......@@ -54,4 +54,5 @@ push:
docker push mitchellrj/hue_exporter:latest-arm7
docker push mitchellrj/hue_exporter:$$(build/hue_exporter.darwin -V)-arm7
DEFAULT: all
.PHONY: all style test format vet staticcheck promu build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment