mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-09 02:24:16 +00:00
fix: fix image builds for non-amd64 architectures
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
2efb519a31
commit
fcf21f1d78
4 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
ARG ARCH=amd64
|
||||
ARG OS=linux
|
||||
ARG GOLANG_BUILDER=1.23
|
||||
ARG GOARCH=
|
||||
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
|
||||
WORKDIR /workspace
|
||||
|
||||
|
|
8
Makefile
8
Makefile
|
@ -193,21 +193,21 @@ image: .hack-operator-image .hack-prometheus-config-reloader-image .hack-admissi
|
|||
# Create empty target file, for the sole purpose of recording when this target
|
||||
# was last executed via the last-modification timestamp on the file. See
|
||||
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_OPERATOR):$(TAG) .
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_OPERATOR):$(TAG) .
|
||||
touch $@
|
||||
|
||||
.hack-prometheus-config-reloader-image: cmd/prometheus-config-reloader/Dockerfile
|
||||
# Create empty target file, for the sole purpose of recording when this target
|
||||
# was last executed via the last-modification timestamp on the file. See
|
||||
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
|
||||
touch $@
|
||||
|
||||
.hack-admission-webhook-image: cmd/admission-webhook/Dockerfile
|
||||
# Create empty target file, for the sole purpose of recording when this target
|
||||
# was last executed via the last-modification timestamp on the file. See
|
||||
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_WEBHOOK):$(TAG) -f cmd/admission-webhook/Dockerfile .
|
||||
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_WEBHOOK):$(TAG) -f cmd/admission-webhook/Dockerfile .
|
||||
touch $@
|
||||
|
||||
.PHONY: update-go-deps
|
||||
|
@ -250,7 +250,7 @@ generate-crds: $(CONTROLLER_GEN_BINARY) $(GOJSONTOYAML_BINARY) $(TYPES_V1_TARGET
|
|||
.PHONY: generate-remote-write-certs
|
||||
generate-remote-write-certs:
|
||||
mkdir -p test/e2e/remote_write_certs && \
|
||||
(cd scripts && GOOS=$(OS) GOARCH=$(ARCH) go run -v ./certs/.)
|
||||
(cd scripts && GOOS=$(OS) GOARCH=$(GOARCH) go run -v ./certs/.)
|
||||
|
||||
.PHONY: generate-docs
|
||||
generate-docs: $(shell find Documentation -type f)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
ARG ARCH=amd64
|
||||
ARG OS=linux
|
||||
ARG GOLANG_BUILDER=1.23
|
||||
ARG GOARCH=
|
||||
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
|
||||
WORKDIR /workspace
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
ARG ARCH=amd64
|
||||
ARG OS=linux
|
||||
ARG GOLANG_BUILDER=1.23
|
||||
ARG GOARCH=
|
||||
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
|
||||
WORKDIR /workspace
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue