From e0f6d747625393ffbd364d75b9addb8fd40f8499 Mon Sep 17 00:00:00 2001 From: Elias Souza Date: Thu, 5 Oct 2023 11:37:46 -0300 Subject: [PATCH] chore: fix os --- Dockerfile | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52b83b8ed..dace6dcce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM golang:1.19-alpine as build WORKDIR ${GOPATH}/src/github.com/quintoandar RUN apk update && apk add make git curl && git clone --branch main https://github.com/quintoandar/postgres_exporter.git WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter +ENV GOARCH=amd64 RUN make release RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter diff --git a/Makefile b/Makefile index e0e7f7355..3f74c2aa7 100644 --- a/Makefile +++ b/Makefile @@ -14,4 +14,4 @@ GO_BUILD_LDFLAGS = -X github.com/prometheus/common/version.Version=$(shell cat V export PMM_RELEASE_PATH?=. release: - go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/postgres_exporter ./cmd/postgres_exporter + GOOS=linux go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/postgres_exporter ./cmd/postgres_exporter