From 380f1e96e221e86bf9bfd3b70b7d088b66611c72 Mon Sep 17 00:00:00 2001 From: Julien Francoz Date: Thu, 17 Aug 2023 22:58:22 +0200 Subject: [PATCH] fix Dockerfile for multi-arch Signed-off-by: Julien Francoz --- Dockerfile | 6 +++--- Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 855272c..e5c84c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ ARG ARCH="amd64" ARG OS="linux" -FROM alpine:3 +FROM --platform=${OS}/${ARCH} alpine:3 +ARG ARCH="amd64" +ARG OS="linux" LABEL maintainer="The Prometheus Authors " RUN apk add smartmontools -ARG ARCH="amd64" -ARG OS="linux" COPY .build/${OS}-${ARCH}/smartctl_exporter /bin/smartctl_exporter EXPOSE 9633 diff --git a/Makefile b/Makefile index 3591265..7734713 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ # limitations under the License. # Needs to be defined before including Makefile.common to auto-generate targets -DOCKER_ARCHS ?= amd64 +DOCKER_ARCHS ?= amd64 arm64 DOCKER_REPO ?= prometheuscommunity include Makefile.common