From 1ace7ed96103e9a89ee2373072948e31c4ab54c2 Mon Sep 17 00:00:00 2001 From: Vadim Bauer Date: Sat, 29 Jun 2024 15:35:20 +0200 Subject: [PATCH] no message Signed-off-by: Vadim Bauer --- tools/spectral/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/spectral/Dockerfile b/tools/spectral/Dockerfile index cb095ab108c..ac847044f05 100644 --- a/tools/spectral/Dockerfile +++ b/tools/spectral/Dockerfile @@ -2,7 +2,12 @@ ARG GOLANG FROM ${GOLANG} ARG SPECTRAL_VERSION -RUN curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$(dpkg --print-architecture) && chmod +x /usr/bin/spectral +RUN case "$(dpkg --print-architecture)" in \ + amd64) ARCH="x86" ;; \ + arm64) ARCH="arm64" ;; \ + *) echo "Unsupported architecture" && exit 1 ;; \ + esac && \ + curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$ARCH && chmod +x /usr/bin/spectral ENTRYPOINT ["/usr/bin/spectral"] CMD ["--version"]