Fix up multi-platform container builds

Use the `--platform` flag on `FROM` to build with the correct platform.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ 2022-10-03 17:44:44 +02:00
parent 14778c90ea
commit 0472e35e77
No known key found for this signature in database
GPG key ID: C646B23C9E3245F1

View file

@ -1,6 +1,6 @@
ARG ARCH="amd64" ARG ARCH="amd64"
ARG OS="linux" ARG OS="linux"
FROM ${ARCH}/alpine:3 FROM --platform ${OS}/${ARCH} alpine:3
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>" LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
RUN apk add smartmontools RUN apk add smartmontools