From 5621bb1926679f17ad7bb3f15cb74c6d38c86c21 Mon Sep 17 00:00:00 2001 From: Tom Herbers Date: Sun, 10 Sep 2023 16:53:21 +0200 Subject: [PATCH] contrib: Dockerfile: add multi arch support --- contrib/docker/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 61cf918de5e..3cd056865c6 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -1,5 +1,10 @@ FROM debian:bookworm-slim +ARG TARGETPLATFORM +ARG BUILDPLATFORM +ARG TARGETOS +ARG TARGETARCH + ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ @@ -27,9 +32,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* RUN mkdir /tmp/ec &&\ - wget -O /tmp/ec/ec-linux-amd64.tar.gz https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.7.0/ec-linux-amd64.tar.gz &&\ - tar -xvzf /tmp/ec/ec-linux-amd64.tar.gz &&\ - mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\ + wget -O /tmp/ec/ec-${TARGETOS}-${TARGETARCH}.tar.gz https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.7.0/ec-${TARGETOS}-${TARGETARCH}.tar.gz &&\ + tar -xvzf /tmp/ec/ec-${TARGETOS}-${TARGETARCH}.tar.gz &&\ + mv bin/ec-${TARGETOS}-${TARGETARCH} /usr/local/bin/editorconfig-checker &&\ rm -rf /tmp/ec RUN useradd -m -d /gluon -u 100 -g 100 -o gluon