Skip to content

Commit

Permalink
contrib: Dockerfile: add multi arch support
Browse files Browse the repository at this point in the history
  • Loading branch information
herbetom committed Sep 10, 2023
1 parent 4adeaa6 commit cb21dd9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM debian:bookworm-slim
FROM --platform=${BUILDPLATFORM:-linux/amd64} 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 \
Expand All @@ -25,9 +30,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 -d /gluon gluon
Expand Down

0 comments on commit cb21dd9

Please sign in to comment.